mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 08:47:14 +03:00
0c0ef1ae1a
Simply re-generated with 'make tests CLERK_OPTS=--reset'
64 lines
1.6 KiB
Plaintext
64 lines
1.6 KiB
Plaintext
## Article
|
|
|
|
```catala
|
|
declaration scope A:
|
|
context x content integer
|
|
context y content integer
|
|
context z content integer
|
|
|
|
scope A:
|
|
definition y under condition x < 0 consequence equals - x
|
|
definition y under condition x >= 0 consequence equals x
|
|
definition z under condition y >= 1 consequence equals 10 / y
|
|
definition z under condition y < 1 consequence equals y
|
|
definition x equals z
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s A
|
|
[ERROR] Cyclic dependency detected between variables of scope A!
|
|
|
|
Cycle variable z, declared:
|
|
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
|
|
|
|
7 | context z content integer
|
|
| ^
|
|
+ Article
|
|
|
|
Used here in the definition of another cycle variable x:
|
|
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
|
|
|
|
14 | definition x equals z
|
|
| ^
|
|
+ Article
|
|
|
|
Cycle variable y, declared:
|
|
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
|
|
|
|
6 | context y content integer
|
|
| ^
|
|
+ Article
|
|
|
|
Used here in the definition of another cycle variable z:
|
|
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
|
|
|
|
13 | definition z under condition y < 1 consequence equals y
|
|
| ^
|
|
+ Article
|
|
|
|
Cycle variable x, declared:
|
|
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
|
|
|
|
5 | context x content integer
|
|
| ^
|
|
+ Article
|
|
|
|
Used here in the definition of another cycle variable y:
|
|
--> tests/test_scope/bad/cycle_in_scope.catala_en
|
|
|
|
|
11 | definition y under condition x >= 0 consequence equals x
|
|
| ^
|
|
+ Article
|
|
#return code 255#
|
|
```
|