catala/tests/test_variable_state/bad/no_cross_exceptions.catala_en
2023-07-12 11:55:11 +02:00

27 lines
653 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.13-14.18:
└──┐
14 │ exception thing definition foo state baz under condition true consequence equals 3
│ ‾‾‾‾‾
└─ Test
#return code 123#
```