Fix IMPLICIT_ACCOUNT, again and this time add regression expect test
This commit is contained in:
parent
dc9747610a
commit
fb8fae05d7
@ -899,3 +899,16 @@ let%expect_test _ =
|
||||
PAIR ;
|
||||
DIP { DROP 5 } } ;
|
||||
DIP { DROP } } } |}]
|
||||
|
||||
let%expect_test _ =
|
||||
run_ligo_good [ "compile-contract" ; contract "implicit.mligo" ; "main" ] ;
|
||||
[%expect {|
|
||||
{ parameter key_hash ;
|
||||
storage unit ;
|
||||
code { DUP ;
|
||||
CAR ;
|
||||
IMPLICIT_ACCOUNT ;
|
||||
UNIT ;
|
||||
NIL operation ;
|
||||
PAIR ;
|
||||
DIP { DROP 2 } } } |}]
|
||||
|
@ -922,6 +922,7 @@ module Compiler = struct
|
||||
| C_AMOUNT -> ok @@ simple_constant @@ prim I_AMOUNT
|
||||
| C_ADDRESS -> ok @@ simple_constant @@ prim I_ADDRESS
|
||||
| C_SELF_ADDRESS -> ok @@ simple_constant @@ seq [prim I_SELF; prim I_ADDRESS]
|
||||
| C_IMPLICIT_ACCOUNT -> ok @@ simple_unary @@ prim I_IMPLICIT_ACCOUNT
|
||||
| C_NOW -> ok @@ simple_constant @@ prim I_NOW
|
||||
| C_CALL -> ok @@ simple_ternary @@ prim I_TRANSFER_TOKENS
|
||||
| C_SOURCE -> ok @@ simple_constant @@ prim I_SOURCE
|
||||
|
3
src/test/contracts/implicit.mligo
Normal file
3
src/test/contracts/implicit.mligo
Normal file
@ -0,0 +1,3 @@
|
||||
let main (p : key_hash) (s : unit) =
|
||||
let c : unit contract = Current.implicit_account p in
|
||||
(([] : operation list), unit)
|
Loading…
Reference in New Issue
Block a user