catala/tests/test_variable_state/bad/no_cross_exceptions.catala_en
2022-11-28 16:38:09 +01:00

28 lines
651 B
Plaintext

## Test
```catala
declaration scope A:
output foo content integer
state bar
state baz
scope A:
label thing definition foo state bar equals 2
definition foo state baz equals foo + 1
exception thing definition foo state baz under condition true consequence equals 3
```
```catala-test-inline
$ catala Typecheck
[ERROR] Unknown label for the scope variable foo.baz: "thing"
┌─⯈ tests/test_variable_state/bad/no_cross_exceptions.catala_en:14.12-17:
└──┐
14 │ exception thing definition foo state baz under condition true consequence equals 3
│ ‾‾‾‾‾
└─ Test
#return code 255#
```