mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-09 01:35:56 +03:00
29 lines
695 B
Plaintext
29 lines
695 B
Plaintext
## Wildcard cannot be used as single match case
|
|
|
|
```catala
|
|
declaration enumeration E:
|
|
-- Case1
|
|
-- Case2
|
|
|
|
declaration scope A:
|
|
context x content E
|
|
context y content integer
|
|
|
|
scope A:
|
|
definition x equals Case1
|
|
definition y equals match x with pattern
|
|
-- anything : 31
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s A
|
|
[ERROR] Couldn't infer the enumeration name from lonely wildcard (wildcard cannot be used as single match case)
|
|
|
|
┌─⯈ tests/test_enum/bad/ambiguous_wildcard.catala_en:15.5-15.21:
|
|
└──┐
|
|
15 │ -- anything : 31
|
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
└─ Wildcard cannot be used as single match case
|
|
#return code 255#
|
|
```
|