catala/tests/struct/bad/nested2.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

79 lines
1.8 KiB
Plaintext

## Article
```catala
declaration structure S:
data x content E
data y content integer
declaration enumeration E:
-- Case1 content boolean
-- Case2 content S
declaration scope A:
output x content E
```
```catala-test-inline
$ catala test-scope A
┌─[WARNING]─
│ In scope "A", the variable "x" is declared but never defined;
│ did you forget something?
├─➤ tests/struct/bad/nested2.catala_en:13.10-13.11:
│ │
│ 13 │ output x content E
│ │ ‾
└─ Article
┌─[WARNING]─
│ The structure "S" is never used; maybe it's unnecessary?
├─➤ tests/struct/bad/nested2.catala_en:4.23-4.24:
│ │
│ 4 │ declaration structure S:
│ │ ‾
└─ Article
┌─[WARNING]─
│ The enumeration "E" is never used; maybe it's unnecessary?
├─➤ tests/struct/bad/nested2.catala_en:8.25-8.26:
│ │
│ 8 │ declaration enumeration E:
│ │ ‾
└─ Article
┌─[ERROR]─
│ Cyclic dependency detected between types!
│ Cycle type S, declared:
├─➤ tests/struct/bad/nested2.catala_en:4.23-4.24:
│ │
│ 4 │ declaration structure S:
│ │ ‾
├─ Article
│ Used here in the definition of another cycle type E:
├─➤ tests/struct/bad/nested2.catala_en:10.20-10.21:
│ │
│ 10 │ -- Case2 content S
│ │ ‾
├─ Article
│ Cycle type E, declared:
├─➤ tests/struct/bad/nested2.catala_en:8.25-8.26:
│ │
│ 8 │ declaration enumeration E:
│ │ ‾
├─ Article
│ Used here in the definition of another cycle type S:
├─➤ tests/struct/bad/nested2.catala_en:5.18-5.19:
│ │
│ 5 │ data x content E
│ │ ‾
└─ Article
#return code 123#
```