catala/tests/test_typing/bad/err5.catala_en

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
956 B
Plaintext
Raw Normal View History

> 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
```
```catala-test-inline
$ catala Typecheck
[ERROR] Error during typechecking, incompatible types:
--> integer
--> Structure
Error coming from typechecking the following expression:
2022-11-24 20:00:45 +03:00
┌─⯈ tests/test_typing/bad/err5.catala_en:8.4-8:
└─┐
8 │ 1040
│ ‾‾‾‾
Type integer coming from expression:
2022-11-24 20:00:45 +03:00
┌─⯈ tests/test_typing/bad/err5.catala_en:8.4-8:
└─┐
8 │ 1040
│ ‾‾‾‾
Type Structure coming from expression:
┌─⯈ tests/test_typing/bad/err5.catala_en:6.4-45:
└─┐
6 │ Structure { -- i: 3 -- e: Int content x };
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
#return code 255#
```