diff --git a/src/bin/expect_tests/michelson_converter.ml b/src/bin/expect_tests/michelson_converter.ml index 6196d8a23..2570892d3 100644 --- a/src/bin/expect_tests/michelson_converter.ml +++ b/src/bin/expect_tests/michelson_converter.ml @@ -106,7 +106,7 @@ let%expect_test _ = ( LIST_EMPTY() , Baz4("eq") ) |}] ; run_ligo_good [ "compile-contract" ; contract "michelson_converter_or.mligo" ; "main_r" ] ; [%expect {| - { parameter (or (int %Foo4) (or (nat %Bar4) (or (string %Baz4) (bool %Boz4)))) ; + { parameter (or (int %foo4) (or (nat %bar4) (or (string %baz4) (bool %boz4)))) ; storage (or (or (nat %bar4) (string %baz4)) (or (bool %boz4) (int %foo4))) ; code { PUSH string "eq" ; LEFT bool ; @@ -139,7 +139,7 @@ let%expect_test _ = ( LIST_EMPTY() , Baz4("eq") ) |}] ; run_ligo_good [ "compile-contract" ; contract "michelson_converter_or.mligo" ; "main_l" ] ; [%expect {| - { parameter (or (or (or (int %Foo4) (nat %Bar4)) (string %Baz4)) (bool %Boz4)) ; + { parameter (or (or (or (int %foo4) (nat %bar4)) (string %baz4)) (bool %boz4)) ; storage (or (or (nat %bar4) (string %baz4)) (or (bool %boz4) (int %foo4))) ; code { PUSH string "eq" ; LEFT bool ; diff --git a/src/stages/4-ast_typed/helpers.ml b/src/stages/4-ast_typed/helpers.ml index f9ad68a76..8911c5605 100644 --- a/src/stages/4-ast_typed/helpers.ml +++ b/src/stages/4-ast_typed/helpers.ml @@ -163,7 +163,8 @@ let kv_list_of_record_or_tuple (m: _ LMap.t) = let remove_empty_annotation (ann : string option) : string option = match ann with | Some "" -> None - | _ -> ann + | Some ann -> Some (String.uncapitalize_ascii ann) + | None -> None let is_michelson_or (t: _ constructor_map) = CMap.cardinal t = 2 &&