catala/tests/io/bad/inputing_to_not_input.catala_en
Louis Gesbert c864f658c8 Cleaner message printing
Aerates the printing of messages, removes extraneous noise, and more clearly
attaches the various information tied to a given message.
2024-05-03 12:21:34 +02:00

46 lines
934 B
Plaintext

# Test
```catala
declaration scope A:
output a content integer
declaration scope B:
a scope A
scope A:
definition a equals 0
scope B:
definition a.a equals 0
assertion a.a = 0
```
```catala-test-inline
$ catala Typecheck
┌─[ERROR]─
│ Invalid assignment to a subscope variable that is not tagged as input or
│ context.
│ Incriminated subscope:
├─➤ tests/io/bad/inputing_to_not_input.catala_en:8.3-8.4:
│ │
│ 8 │ a scope A
│ │ ‾
├─ Test
│ Incriminated variable:
├─➤ tests/io/bad/inputing_to_not_input.catala_en:5.10-5.11:
│ │
│ 5 │ output a content integer
│ │ ‾
├─ Test
│ Incriminated subscope variable definition:
├─➤ tests/io/bad/inputing_to_not_input.catala_en:14.3-14.17:
│ │
│ 14 │ definition a.a equals 0
│ │ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
└─
#return code 123#
```