mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
c864f658c8
Aerates the printing of messages, removes extraneous noise, and more clearly attaches the various information tied to a given message.
79 lines
1.8 KiB
Plaintext
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#
|
|
```
|