From 28d7670ea41938fb76bf606031aa693a77dc6322 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 30 Apr 2024 13:48:08 +0200 Subject: [PATCH] bad nested function --- test/test_projet_pfa_23_24.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_projet_pfa_23_24.ml b/test/test_projet_pfa_23_24.ml index 204b629..d3819cd 100644 --- a/test/test_projet_pfa_23_24.ml +++ b/test/test_projet_pfa_23_24.ml @@ -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)))