From bb0da8d3ca42a7637b61a638f1a318b86c0ba34d Mon Sep 17 00:00:00 2001 From: radrow Date: Thu, 26 Mar 2020 20:22:44 +0100 Subject: [PATCH] Fixed type printing --- src/aeso_compiler.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aeso_compiler.erl b/src/aeso_compiler.erl index c677119..ae25a65 100644 --- a/src/aeso_compiler.erl +++ b/src/aeso_compiler.erl @@ -336,12 +336,12 @@ to_sophia_value(ContractString, FunName, ok, Data, Options0) -> try {ok, aeso_vm_decode:from_fate(Type, aeb_fate_encoding:deserialize(Data))} catch throw:cannot_translate_to_sophia -> - Type1 = prettypr:format(aeso_pretty:type(Type)), + Type1 = prettypr:format(aeso_pretty:type(Type0)), Msg = io_lib:format("Cannot translate FATE value ~p\n of Sophia type ~s\n", [aeb_fate_encoding:deserialize(Data), Type1]), {error, [aeso_errors:new(data_error, Msg)]}; _:_ -> - Type1 = prettypr:format(aeso_pretty:type(Type)), + Type1 = prettypr:format(aeso_pretty:type(Type0)), Msg = io_lib:format("Failed to decode binary as type ~s\n", [Type1]), {error, [aeso_errors:new(data_error, Msg)]} end