diff --git a/src/bin/cli.ml b/src/bin/cli.ml index 92716d380..f9b6321e5 100644 --- a/src/bin/cli.ml +++ b/src/bin/cli.ml @@ -327,7 +327,7 @@ let dry_run = let%bind simplified = Compile.Of_source.compile_contract_input storage input v_syntax in let%bind typed,_ = Compile.Of_simplified.compile_expression ~env ~state simplified in let%bind mini_c = Compile.Of_typed.compile_expression typed in - let%bind compiled_params = Compile.Of_mini_c.compile_expression mini_c in + let%bind compiled_params = Compile.Of_mini_c.aggregate_and_compile_expression mini_c_prg mini_c in let%bind args_michelson = Run.evaluate_expression compiled_params.expr compiled_params.expr_ty in let%bind options = Run.make_dry_run_options {predecessor_timestamp ; amount ; sender ; source } in diff --git a/src/bin/expect_tests/contract_tests.ml b/src/bin/expect_tests/contract_tests.ml index b3ccd0aa0..c1ec32c6e 100644 --- a/src/bin/expect_tests/contract_tests.ml +++ b/src/bin/expect_tests/contract_tests.ml @@ -1125,4 +1125,9 @@ let%expect_test _ = [%expect {| { parameter int ; storage (pair (map %one key_hash nat) (big_map %two key_hash bool)) ; - code { DUP ; CDR ; NIL operation ; PAIR ; DIP { DROP } } } |}] \ No newline at end of file + code { DUP ; CDR ; NIL operation ; PAIR ; DIP { DROP } } } |}] + +let%expect_test _ = + run_ligo_good [ "dry-run" ; contract "super-counter.mligo" ; "main" ; "test_param" ; "test_storage" ] ; + [%expect {| + ( list[] , 3 ) |}] \ No newline at end of file diff --git a/src/test/contracts/super-counter.mligo b/src/test/contracts/super-counter.mligo index 613d9b29b..dc00c9567 100644 --- a/src/test/contracts/super-counter.mligo +++ b/src/test/contracts/super-counter.mligo @@ -2,6 +2,9 @@ type action = | Increment of int | Decrement of int +let test_param = Increment(1) +let test_storage = 2 + let main (ps : action * int) : (operation list * int) = let storage = match ps.0 with