2022-09-15 18:25:58 +03:00
|
|
|
> Include: common.catala_en
|
|
|
|
|
|
|
|
```catala
|
|
|
|
scope S:
|
|
|
|
definition z equals [
|
|
|
|
Structure { -- i: 3 -- e: Int content x };
|
|
|
|
Structure { -- i: 4 -- e: y };
|
|
|
|
1040
|
|
|
|
]
|
|
|
|
definition a equals number of (z ++ z) / 2
|
|
|
|
```
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
```catala-test-inline
|
|
|
|
$ catala Typecheck
|
|
|
|
[ERROR] Error during typechecking, incompatible types:
|
|
|
|
--> integer
|
2022-09-20 19:32:38 +03:00
|
|
|
--> Structure
|
2022-09-23 15:04:13 +03:00
|
|
|
|
|
|
|
Error coming from typechecking the following expression:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_typing/bad/err5.catala_en:8.4-8
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-10-04 15:45:03 +03:00
|
|
|
8 | 1040
|
|
|
|
| ^^^^
|
2022-09-26 15:27:47 +03:00
|
|
|
+
|
2022-09-23 15:04:13 +03:00
|
|
|
|
2022-09-16 19:29:27 +03:00
|
|
|
Type integer coming from expression:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_typing/bad/err5.catala_en:8.4-8
|
2022-09-26 15:27:47 +03:00
|
|
|
|
|
2022-09-20 19:32:38 +03:00
|
|
|
8 | 1040
|
|
|
|
| ^^^^
|
2022-09-26 15:27:47 +03:00
|
|
|
+
|
2022-09-20 19:32:38 +03:00
|
|
|
|
|
|
|
Type Structure coming from expression:
|
2022-10-27 13:10:23 +03:00
|
|
|
--> tests/test_typing/bad/common.catala_en:14.30-39
|
2022-10-04 15:45:03 +03:00
|
|
|
|
|
|
|
|
14 | output z content collection Structure
|
|
|
|
| ^^^^^^^^^
|
|
|
|
+
|
2022-09-23 15:10:07 +03:00
|
|
|
#return code 255#
|
2022-09-15 18:25:58 +03:00
|
|
|
```
|