mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-12 21:48:25 +03:00
34 lines
913 B
Plaintext
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#
|
|
```
|