Merge pull request #116 from aeternity/another_no_code

to_sophia_value should also use no_code option
This commit is contained in:
Hans Svensson 2019-08-05 15:21:27 +02:00 committed by GitHub
commit 6a27c4a68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,7 +302,8 @@ to_sophia_value(_, _, revert, Data, Options) ->
Err = aeb_fate_encoding:deserialize(Data),
{ok, {app, [], {id, [], "abort"}, [{string, [], Err}]}}
end;
to_sophia_value(ContractString, FunName, ok, Data, Options) ->
to_sophia_value(ContractString, FunName, ok, Data, Options0) ->
Options = [no_code | Options0],
try
Code = string_to_code(ContractString, Options),
#{ typed_ast := TypedAst, type_env := TypeEnv} = Code,