Test tuples without annotations.

This commit is contained in:
Sander Spies 2020-04-13 10:31:09 +02:00
parent a4a8e9d2bc
commit 42b05c0437
2 changed files with 21 additions and 1 deletions

View File

@ -1173,7 +1173,20 @@ ligo: in file "create_contract_var.mligo", line 6, character 35 to line 10, char
CONS ;
DIP { DIP { DUP } ; SWAP ; CDR } ;
PAIR ;
DIP { DROP 2 } } } |}]
DIP { DROP 2 } } } |}];
run_ligo_good [ "compile-contract" ; contract "tuples_no_annotation.religo" ; "main" ] ;
[%expect {|
{ parameter int ;
storage (pair (pair int string) (pair nat bool)) ;
code { PUSH string "2" ;
PUSH int 2 ;
PAIR ;
DIP { PUSH bool False ; PUSH nat 2 ; PAIR } ;
PAIR ;
NIL operation ;
PAIR ;
DIP { DROP } } } |}]
let%expect_test _ =
run_ligo_bad [ "compile-contract" ; bad_contract "self_type_annotation.ligo" ; "main" ] ;

View File

@ -0,0 +1,7 @@
type storage = (int, string, nat, bool)
type parameter = int
let main = ((p,storage): (parameter, storage)) => {
([]: list (operation), (2, "2", 2n, false));
};