mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 08:47:14 +03:00
7bcafa4ead
This is a workaround (but corresponds to what was executed before) and means that we re-explore all exprs to look for free variables. The proper fix will be to store boxed_exprs inside scopes instead.
41 lines
1.1 KiB
Plaintext
41 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 for m in list of (m >=$ $7)
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s A
|
|
[ERROR] Error during typechecking, incompatible types:
|
|
--> integer
|
|
--> money
|
|
|
|
Error coming from typechecking the following expression:
|
|
--> tests/test_array/bad/fold_error.catala_en
|
|
|
|
|
10 | definition list_high_count equals number for m in list of (m >=$ $7)
|
|
| ^^^^
|
|
+ Article
|
|
|
|
Type integer coming from expression:
|
|
--> tests/test_array/bad/fold_error.catala_en
|
|
|
|
|
5 | context list content collection integer
|
|
| ^^^^^^^
|
|
+ Article
|
|
|
|
Type money coming from expression:
|
|
--> tests/test_array/bad/fold_error.catala_en
|
|
|
|
|
10 | definition list_high_count equals number for m in list of (m >=$ $7)
|
|
| ^^^
|
|
+ Article
|
|
#return code 255#
|
|
```
|