diff --git a/src/test/contracts/let_in_multi_bind.mligo b/src/test/contracts/let_in_multi_bind.mligo new file mode 100644 index 000000000..5555b7ae1 --- /dev/null +++ b/src/test/contracts/let_in_multi_bind.mligo @@ -0,0 +1,2 @@ +let sum (p: int * int) : int = + let i, result = p in i + result diff --git a/src/test/integration_tests.ml b/src/test/integration_tests.ml index 05a95463d..d0931a3cf 100644 --- a/src/test/integration_tests.ml +++ b/src/test/integration_tests.ml @@ -1795,6 +1795,11 @@ let type_tuple_destruct () : unit result = let%bind () = expect_eq program "type_tuple_d_2" (e_unit ()) (e_string "helloworld") in ok () +let let_in_multi_bind () : unit result = + let%bind program = mtype_file "./contracts/let_in_multi_bind.mligo" in + let%bind () = expect_eq program "sum" (e_tuple [e_int 10; e_int 10]) (e_int 20) + in ok () + let main = test_suite "Integration (End to End)" [ test "key hash" key_hash ; test "chain id" chain_id ; @@ -1933,4 +1938,5 @@ let main = test_suite "Integration (End to End)" [ test "deep_access (ligo)" deep_access_ligo; test "entrypoints (ligo)" entrypoints_ligo ; test "type tuple destruct (mligo)" type_tuple_destruct ; + test "let in multi-bind (mligo)" let_in_multi_bind ; ]