Dialyzer found an error

This commit is contained in:
Hans Svensson 2019-02-26 21:03:52 +01:00
parent 4c79f7b9f2
commit 5a3c8530b4
2 changed files with 3 additions and 3 deletions

View File

@ -40,8 +40,8 @@
%%% Handle calldata
create_calldata(FunName, Args, ArgTypes, RetType) ->
<<TypeHashInt:?HASH_SIZE/unit:8>> =
function_type_hash(list_to_binary(FunName), ArgTypes, RetType),
{<<TypeHashInt:?HASH_SIZE/unit:8>>, _, _, _} =
function_type_info(list_to_binary(FunName), ArgTypes, RetType),
Data = aeso_heap:to_binary({TypeHashInt, list_to_tuple(Args)}),
{ok, Data, {tuple, [word, {tuple, ArgTypes}]}, RetType}.

View File

@ -273,7 +273,7 @@ translate_vm_value(_VmType, _Type, _Data) ->
-spec create_calldata(string(), string(), [string()]) ->
{ok, binary(), aeso_sophia:type(), aeso_sophia:type()}
| {error, argument_syntax_error}.
| {error, term()}.
create_calldata(Code, Fun, Args) ->
case check_call(Code, Fun, Args, []) of
{ok, FunName, {ArgTypes, RetType}, VMArgs} ->