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:
|
2022-09-16 19:29:27 +03:00
|
|
|
--> decimal
|
2022-09-23 15:04:13 +03:00
|
|
|
--> integer
|
|
|
|
|
|
|
|
Error coming from typechecking the following expression:
|
2022-09-16 19:29:27 +03:00
|
|
|
--> tests/test_typing/bad/common.catala_en
|
|
|
|
|
|
|
|
|
15 | output a content decimal
|
|
|
|
| ^
|
|
|
|
+
|
2022-09-23 15:04:13 +03:00
|
|
|
|
2022-09-16 19:29:27 +03:00
|
|
|
Type decimal coming from expression:
|
|
|
|
--> tests/test_typing/bad/common.catala_en
|
|
|
|
|
|
|
|
|
15 | output a content decimal
|
|
|
|
| ^^^^^^^
|
|
|
|
+
|
2022-09-23 15:04:13 +03:00
|
|
|
|
2022-09-16 19:29:27 +03:00
|
|
|
Type integer coming from expression:
|
|
|
|
--> tests/test_typing/bad/err5.catala_en
|
|
|
|
|
|
|
|
|
10 | definition a equals number of (z ++ z) / 2
|
|
|
|
| ^^^^^^
|
|
|
|
+
|
2022-09-23 15:10:07 +03:00
|
|
|
#return code 255#
|
2022-09-15 18:25:58 +03:00
|
|
|
```
|