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
|
|
|
|
```
|
2022-07-08 17:23:09 +03:00
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
```catala-test-inline
|
|
|
|
$ catala Typecheck
|
|
|
|
[ERROR] Cyclic dependency detected between variables of scope A!
|
|
|
|
|
|
|
|
Cycle variable foofoo.bar, declared:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:9.10-13
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
9 | state bar
|
|
|
|
| ^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Used here in the definition of another cycle variable foofoo.baz:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:19.37-43
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
19 | definition foofoo state baz equals foofoo + 1
|
|
|
|
| ^^^^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Cycle variable foofoo.baz, declared:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:10.10-13
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
10 | state baz
|
|
|
|
| ^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Used here in the definition of another cycle variable foo.bar:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:13.34-40
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
13 | definition foo state bar equals foofoo
|
|
|
|
| ^^^^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Cycle variable foo.bar, declared:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:6.10-13
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
6 | state bar
|
|
|
|
| ^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Used here in the definition of another cycle variable foo.baz:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:15.34-37
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
15 | definition foo state baz equals foo + 1
|
|
|
|
| ^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Cycle variable foo.baz, declared:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:7.10-13
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
7 | state baz
|
|
|
|
| ^^^
|
|
|
|
+ Test
|
|
|
|
|
|
|
|
Used here in the definition of another cycle variable foofoo.bar:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_variable_state/bad/state_cycle.catala_en:17.37-40
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
17 | definition foofoo state bar equals foo
|
|
|
|
| ^^^
|
|
|
|
+ Test
|
2022-09-23 15:10:07 +03:00
|
|
|
#return code 255#
|
2022-07-08 17:23:09 +03:00
|
|
|
```
|