catala/tests/test_scope/bad/scope.catala_en

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

50 lines
1.5 KiB
Plaintext
Raw Normal View History

## 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
2023-03-31 18:56:45 +03:00
[WARNING] In scope "A", the variable "a" is never used anywhere; maybe it's unnecessary?
2023-04-17 19:07:22 +03:00
┌─⯈ tests/test_scope/bad/scope.catala_en:5.11-5.12:
2023-03-31 18:56:45 +03:00
└─┐
5 │ context a content integer
│ ‾
└─ Article
[WARNING] In scope "A", the variable "b" is never used anywhere; maybe it's unnecessary?
2023-04-17 19:07:22 +03:00
┌─⯈ tests/test_scope/bad/scope.catala_en:6.11-6.12:
2023-03-31 18:56:45 +03:00
└─┐
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:
2023-04-17 19:07:22 +03:00
┌─⯈ 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:
2023-04-17 19:07:22 +03:00
┌─⯈ 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#
```