bad nested function
This commit is contained in:
parent
63eefc3166
commit
28d7670ea4
1 changed files with 7 additions and 0 deletions
|
@ -51,6 +51,13 @@ let tests_typeof =
|
||||||
, Term.(
|
, Term.(
|
||||||
App (App (Fun (x, Fun (y, Binop (Var x, Plus, Var y))), IntConst 3), IntConst 4))
|
App (App (Fun (x, Fun (y, Binop (Var x, Plus, Var y))), IntConst 3), IntConst 4))
|
||||||
, Some Type.Int )
|
, 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 *)
|
; (* Function with nested pair *)
|
||||||
( "(fun x -> fst x) (1, 2)"
|
( "(fun x -> fst x) (1, 2)"
|
||||||
, Term.(App (Fun (x, Proj (First, Var x)), Pair (IntConst 1, IntConst 2)))
|
, Term.(App (Fun (x, Proj (First, Var x)), Pair (IntConst 1, IntConst 2)))
|
||||||
|
|
Reference in a new issue