catala/tests/test_enum/bad/quick_pattern_4.catala_en
2023-04-27 12:09:22 +02:00

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#
```