(Some [ID "f"; LPAREN; STRING "a"; COMMA; INT 3; COMMA; ID "foo"; RPAREN])
~is_error_expected_semant:(Some Error.is_unknown_id)
)
- ; ( let code =
- "let \
- type a = int \
- type b = a \
- type c = b \
- var i : a := 2 \
- var j : c := 3 \
- in \
- i := j \
- end \
- "
- in
- Test.case
+ ; ( Test.case
"Type aliases"
- ~code
+ ~code:
+ "let \
+ type a = int \
+ type b = a \
+ type c = b \
+ var i : a := 2 \
+ var j : c := 3 \
+ in \
+ i := j \
+ end \
+ "
)
; ( let code =
"let \
lst \n\
end"
)
+ ; ( Test.case
+ "Cycle in type dec"
+ ~code:"\
+ let \n\
+ type a = b \n\
+ type b = a \n\
+ in \n\
+ end \
+ "
+ ~is_error_expected_semant:(Some Error.is_cycle_in_type_dec)
+ )
+ ; ( Test.case
+ "Cycle in type dec"
+ ~code:"\
+ let \n\
+ type a = b \n\
+ type b = c \n\
+ type c = a \n\
+ var x : a := 1 \n\
+ in \n\
+ end \
+ "
+ ~is_error_expected_semant:(Some Error.is_cycle_in_type_dec)
+ )
]
let book ~dir =