2022-03-07 13:55:26 +03:00
|
|
|
## 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
|
|
|
|
```
|
2022-07-08 17:23:09 +03:00
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
```catala-test-inline
|
|
|
|
$ catala Typecheck
|
2023-07-06 13:44:44 +03:00
|
|
|
[ERROR]
|
|
|
|
Unknown label for the scope variable foo.baz: "thing"
|
|
|
|
|
2023-04-17 19:07:22 +03:00
|
|
|
┌─⯈ tests/test_variable_state/bad/no_cross_exceptions.catala_en:14.13-14.18:
|
2022-10-27 13:18:00 +03:00
|
|
|
└──┐
|
|
|
|
14 │ exception thing definition foo state baz under condition true consequence equals 3
|
|
|
|
│ ‾‾‾‾‾
|
|
|
|
└─ Test
|
2023-06-28 16:57:52 +03:00
|
|
|
#return code 123#
|
2022-07-08 17:23:09 +03:00
|
|
|
```
|