Add missing error message

This commit is contained in:
Ulf Norell 2019-08-05 14:01:35 +02:00
parent eb968d3cb9
commit 79ae92a068

View File

@ -156,7 +156,7 @@ bind_tvars(Xs, Env) ->
check_tvar(#env{ typevars = TVars}, T = {tvar, _, X}) -> check_tvar(#env{ typevars = TVars}, T = {tvar, _, X}) ->
case TVars == unrestricted orelse lists:member(X, TVars) of case TVars == unrestricted orelse lists:member(X, TVars) of
true -> ok; true -> ok;
false -> type_error({unbound_type_variable, T}) false -> type_error({unbound_type, T})
end, end,
T. T.
@ -2160,6 +2160,8 @@ pp_error({contract_has_no_entrypoints, Con}) ->
io_lib:format("The contract ~s (at ~s) has no entrypoints. Since Sophia version 3.2, public\n" io_lib:format("The contract ~s (at ~s) has no entrypoints. Since Sophia version 3.2, public\n"
"contract functions must be declared with the 'entrypoint' keyword instead of\n" "contract functions must be declared with the 'entrypoint' keyword instead of\n"
"'function'.\n", [pp_expr("", Con), pp_loc(Con)]); "'function'.\n", [pp_expr("", Con), pp_loc(Con)]);
pp_error({unbound_type, Type}) ->
io_lib:format("Unbound type ~s (at ~s).\n", [pp_type("", Type), pp_loc(Type)]);
pp_error(Err) -> pp_error(Err) ->
io_lib:format("Unknown error: ~p\n", [Err]). io_lib:format("Unknown error: ~p\n", [Err]).