catala/tests/test_typing/bad/err4.catala_en
2022-11-28 16:38:09 +01:00

39 lines
1004 B
Plaintext

> Include: common.catala_en
```catala
scope S:
definition z equals [ Int content x ]
definition a equals number of (z ++ z) / 2
```
Should be "catala Typecheck", see test err3
```catala-test-inline
$ catala ocaml
[ERROR] Error during typechecking, incompatible types:
--> Enum
--> Structure
Error coming from typechecking the following expression:
┌─⯈ tests/test_typing/bad/err4.catala_en:5.24-37:
└─┐
5 │ definition z equals [ Int content x ]
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾
Type Enum coming from expression:
┌─⯈ tests/test_typing/bad/err4.catala_en:5.24-37:
└─┐
5 │ definition z equals [ Int content x ]
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾
Type Structure coming from expression:
┌─⯈ tests/test_typing/bad/common.catala_en:14.30-39:
└──┐
14 │ output z content collection Structure
│ ‾‾‾‾‾‾‾‾‾
#return code 255#
```