From 79ae92a068eb70e7f6ef2e5025a8af55f2df69c1 Mon Sep 17 00:00:00 2001 From: Ulf Norell Date: Mon, 5 Aug 2019 14:01:35 +0200 Subject: [PATCH] Add missing error message --- src/aeso_ast_infer_types.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aeso_ast_infer_types.erl b/src/aeso_ast_infer_types.erl index 697845b..725323d 100644 --- a/src/aeso_ast_infer_types.erl +++ b/src/aeso_ast_infer_types.erl @@ -156,7 +156,7 @@ bind_tvars(Xs, Env) -> check_tvar(#env{ typevars = TVars}, T = {tvar, _, X}) -> case TVars == unrestricted orelse lists:member(X, TVars) of true -> ok; - false -> type_error({unbound_type_variable, T}) + false -> type_error({unbound_type, T}) end, 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" "contract functions must be declared with the 'entrypoint' keyword instead of\n" "'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) -> io_lib:format("Unknown error: ~p\n", [Err]).