catala/tests/test_func/bad/param_inconsistency.catala_en
2023-04-27 12:09:22 +02:00

34 lines
913 B
Plaintext

```catala
declaration scope S:
input cond content boolean
internal f1 content decimal depends on x content integer
output out content decimal
scope S:
definition f1 of x under condition cond
consequence equals decimal of (x * 2)
definition f1 of y under condition not cond
consequence equals y / 2
definition out equals f1 of 10
```
```catala-test-inline
$ catala typecheck
[ERROR] Function argument name mismatch between declaration ('x') and definition ('y')
Argument declared here:
┌─⯈ tests/test_func/bad/param_inconsistency.catala_en:4.42-4.43:
└─┐
4 │ internal f1 content decimal depends on x content integer
│ ‾
Defined here:
┌─⯈ tests/test_func/bad/param_inconsistency.catala_en:10.20-10.21:
└──┐
10 │ definition f1 of y under condition not cond
│ ‾
#return code 255#
```