catala/tests/test_variable_state/bad/state_cycle.catala_en

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-03-06 19:34:51 +03:00
## Test
```catala
declaration scope A:
output foo content integer
state bar
state baz
output foofoo content integer
state bar
state baz
scope A:
definition foo state bar equals foofoo
definition foo state baz equals foo + 1
definition foofoo state bar equals foo
definition foofoo state baz equals foofoo + 1
```
```catala-test-inline
$ catala Typecheck
[ERROR]
Cyclic dependency detected between the following variables of scope A:
foofoo@bar → foofoo@baz → foo@bar → foo@baz → foofoo@bar
foofoo@bar is used here in the definition of foofoo@baz:
2023-04-17 19:07:22 +03:00
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:19.38-19.44:
└──┐
19 │ definition foofoo state baz equals foofoo + 1
│ ‾‾‾‾‾‾
└─ Test
foofoo@baz is used here in the definition of foo@bar:
2023-04-17 19:07:22 +03:00
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:13.35-13.41:
└──┐
13 │ definition foo state bar equals foofoo
│ ‾‾‾‾‾‾
└─ Test
foo@bar is used here in the definition of foo@baz:
2023-04-17 19:07:22 +03:00
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:15.35-15.38:
└──┐
15 │ definition foo state baz equals foo + 1
│ ‾‾‾
└─ Test
foo@baz is used here in the definition of foofoo@bar:
2023-04-17 19:07:22 +03:00
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:17.38-17.41:
└──┐
17 │ definition foofoo state bar equals foo
│ ‾‾‾
└─ Test
#return code 123#
```