1
0
Fork 0

bad nested function

This commit is contained in:
Mylloon 2024-04-30 13:48:08 +02:00
parent 63eefc3166
commit 28d7670ea4
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -51,6 +51,13 @@ let tests_typeof =
, Term.(
App (App (Fun (x, Fun (y, Binop (Var x, Plus, Var y))), IntConst 3), IntConst 4))
, Some Type.Int )
; (* Bad Nested functions *)
( "(fun x -> fun y -> x + y) 3 (2, 4)"
, Term.(
App
( App (Fun (x, Fun (y, Binop (Var x, Plus, Var y))), IntConst 3)
, Pair (IntConst 2, IntConst 4) ))
, None )
; (* Function with nested pair *)
( "(fun x -> fst x) (1, 2)"
, Term.(App (Fun (x, Proj (First, Var x)), Pair (IntConst 1, IntConst 2)))