diff --git a/src/catala/default_calculus/interpreter.ml b/src/catala/default_calculus/interpreter.ml index 2c559eb9..fdec4bb7 100644 --- a/src/catala/default_calculus/interpreter.ml +++ b/src/catala/default_calculus/interpreter.ml @@ -134,9 +134,7 @@ let rec evaluate_expr (e : A.expr Pos.marked) : A.expr Pos.marked = ] ) @ List.map (fun (_, sub) -> - ( Some - "This value is available because the justification of its definition is \ - true:", + ( Some "This value is available because this justification is true:", Pos.get_position sub )) (List.filter (fun (sub, _) -> not (is_empty_error sub)) diff --git a/tests/test_func/func.catala b/tests/test_func/func.catala index 0aab0c9e..979f2e83 100644 --- a/tests/test_func/func.catala +++ b/tests/test_func/func.catala @@ -3,22 +3,20 @@ /* new scope S: param f type int fun of int - param x type int param b type bool + param out type int new scope R: param s scope S param r type int scope S: - def f of x1 [ (x1 >= x1) ] := x1 + x1 - def f of x2 [ not b ] := x2 * x2 - + def f of x [ (x >= x) ] := x + x + def f of x [ not b ] := x * x def b := false - - def x := f of 3 + def out := f of 5 scope R: def s.f of x := x + x * x - def r := s.f of 5 + def r := s.out */ diff --git a/tests/test_func/func.catala.S.out b/tests/test_func/func.catala.S.out index ff08bb03..f78d0c87 100644 --- a/tests/test_func/func.catala.S.out +++ b/tests/test_func/func.catala.S.out @@ -3,11 +3,11 @@ [ERROR] This value is available because the justification of its definition is true: [ERROR] --> test_func/func.catala [ERROR] | -[ERROR] 14 | def f of x1 [ (x1 >= x1) ] := x1 + x1 -[ERROR] | ^^^^^^^^ +[ERROR] 14 | def f of x [ (x >= x) ] := x + x +[ERROR] | ^^^^^^ [ERROR] [ERROR] This value is available because the justification of its definition is true: [ERROR] --> test_func/func.catala [ERROR] | -[ERROR] 15 | def f of x2 [ not b ] := x2 * x2 -[ERROR] | ^^^^^ +[ERROR] 15 | def f of x [ not b ] := x * x +[ERROR] | ^^^^^