mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-09 01:35:56 +03:00
48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
## Test
|
|
|
|
```catala
|
|
declaration enumeration E:
|
|
-- Case1
|
|
-- Case2
|
|
|
|
declaration enumeration F:
|
|
-- Case3
|
|
|
|
declaration scope A:
|
|
context x content E
|
|
context y content boolean
|
|
|
|
scope A:
|
|
definition x equals Case1
|
|
definition y equals x with pattern Case3
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s A
|
|
[ERROR] Error during typechecking, incompatible types:
|
|
--> E
|
|
--> F
|
|
|
|
Error coming from typechecking the following expression:
|
|
┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:17.21-17.22:
|
|
└──┐
|
|
17 │ definition y equals x with pattern Case3
|
|
│ ‾
|
|
└─ Test
|
|
|
|
Type E coming from expression:
|
|
┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:12.19-12.20:
|
|
└──┐
|
|
12 │ context x content E
|
|
│ ‾
|
|
└─ Test
|
|
|
|
Type F coming from expression:
|
|
┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:17.21-17.41:
|
|
└──┐
|
|
17 │ definition y equals x with pattern Case3
|
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
└─ Test
|
|
#return code 255#
|
|
```
|