catala/tests/test_array/bad/fold_error.catala_en
Louis Gesbert 47502335aa Refactor the parser to use priorities
Define a single expression rule with disambiguation using token priorities
instead of the many layers of intermediate rules with explicit sub-terms.

Also replaces `in` for collection operations (`x+1 for foo in [1;2]`) with
`among` which helps a lot.
2022-12-19 15:12:53 +01:00

39 lines
1.1 KiB
Plaintext

## Article
```catala
declaration scope A:
context list content collection integer
context list_high_count content integer
scope A:
definition list equals [0; 5; 6; 7; 1; 64; 12]
definition list_high_count equals number of (m >= $7) for m among list
```
```catala-test-inline
$ catala Interpret -s A
[ERROR] I don't know how to apply operator >= on types integer and
money
┌─⯈ tests/test_array/bad/fold_error.catala_en:10.49-51:
└──┐
10 │ definition list_high_count equals number of (m >= $7) for m among list
│ ‾‾
└─ Article
Type integer coming from expression:
┌─⯈ tests/test_array/bad/fold_error.catala_en:5.34-41:
└─┐
5 │ context list content collection integer
│ ‾‾‾‾‾‾‾
└─ Article
Type money coming from expression:
┌─⯈ tests/test_array/bad/fold_error.catala_en:10.52-54:
└──┐
10 │ definition list_high_count equals number of (m >= $7) for m among list
│ ‾‾
└─ Article
#return code 255#
```