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.

83 lines
2.0 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 variables of scope A!
Cycle variable foofoo.bar, declared:
--> tests/test_variable_state/bad/state_cycle.catala_en:9.10-13
2022-09-26 15:27:47 +03:00
|
9 | state bar
| ^^^
+ Test
Used here in the definition of another cycle variable foofoo.baz:
--> tests/test_variable_state/bad/state_cycle.catala_en:19.37-43
2022-09-26 15:27:47 +03:00
|
19 | definition foofoo state baz equals foofoo + 1
| ^^^^^^
+ Test
Cycle variable foofoo.baz, declared:
--> tests/test_variable_state/bad/state_cycle.catala_en:10.10-13
2022-09-26 15:27:47 +03:00
|
10 | state baz
| ^^^
+ Test
Used here in the definition of another cycle variable foo.bar:
--> tests/test_variable_state/bad/state_cycle.catala_en:13.34-40
2022-09-26 15:27:47 +03:00
|
13 | definition foo state bar equals foofoo
| ^^^^^^
+ Test
Cycle variable foo.bar, declared:
--> tests/test_variable_state/bad/state_cycle.catala_en:6.10-13
2022-09-26 15:27:47 +03:00
|
6 | state bar
| ^^^
+ Test
Used here in the definition of another cycle variable foo.baz:
--> tests/test_variable_state/bad/state_cycle.catala_en:15.34-37
2022-09-26 15:27:47 +03:00
|
15 | definition foo state baz equals foo + 1
| ^^^
+ Test
Cycle variable foo.baz, declared:
--> tests/test_variable_state/bad/state_cycle.catala_en:7.10-13
2022-09-26 15:27:47 +03:00
|
7 | state baz
| ^^^
+ Test
Used here in the definition of another cycle variable foofoo.bar:
--> tests/test_variable_state/bad/state_cycle.catala_en:17.37-40
2022-09-26 15:27:47 +03:00
|
17 | definition foofoo state bar equals foo
| ^^^
+ Test
#return code 255#
```