Proper checking of types

This commit is contained in:
Ulf Norell
2019-02-04 18:01:47 +01:00
parent dfa286d43c
commit d9188d58a7
6 changed files with 187 additions and 54 deletions
+4 -2
View File
@@ -161,8 +161,10 @@ create_calldata(Contract, Function, Argument) when is_map(Contract) ->
get_arg_icode(Funs) ->
[Args] = [ Args || {[_, ?CALL_NAME], _, _, {funcall, _, Args}, _} <- Funs ],
Args.
case [ Args || {[_, ?CALL_NAME], _, _, {funcall, _, Args}, _} <- Funs ] of
[Args] -> Args;
[] -> error({missing_call_function, Funs})
end.
get_call_type([{contract, _, _, Defs}]) ->
case [ {lists:last(QFunName), FunType}