mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 08:47:14 +03:00
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
## Article
|
|
|
|
```catala
|
|
declaration scope A:
|
|
context a content integer
|
|
context b content integer
|
|
context c content boolean
|
|
|
|
scope A:
|
|
definition c equals false
|
|
definition a under condition c consequence equals 42
|
|
definition a under condition not c consequence equals 0
|
|
definition b under condition not c consequence equals 1337
|
|
definition b under condition not c consequence equals 0
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s A
|
|
[WARNING] In scope "A", the variable "a" is never used anywhere; maybe it's unnecessary?
|
|
|
|
┌─⯈ tests/test_scope/bad/scope.catala_en:5.11-5.12:
|
|
└─┐
|
|
5 │ context a content integer
|
|
│ ‾
|
|
└─ Article
|
|
[WARNING] In scope "A", the variable "b" is never used anywhere; maybe it's unnecessary?
|
|
|
|
┌─⯈ tests/test_scope/bad/scope.catala_en:6.11-6.12:
|
|
└─┐
|
|
6 │ context b content integer
|
|
│ ‾
|
|
└─ Article
|
|
[ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
|
|
|
This consequence has a valid justification:
|
|
┌─⯈ tests/test_scope/bad/scope.catala_en:13.57-13.61:
|
|
└──┐
|
|
13 │ definition b under condition not c consequence equals 1337
|
|
│ ‾‾‾‾
|
|
└─ Article
|
|
|
|
This consequence has a valid justification:
|
|
┌─⯈ tests/test_scope/bad/scope.catala_en:14.57-14.58:
|
|
└──┐
|
|
14 │ definition b under condition not c consequence equals 0
|
|
│ ‾
|
|
└─ Article
|
|
#return code 255#
|
|
```
|