From 3ceeee22fa18ea98280f24319e29134d56b4e613 Mon Sep 17 00:00:00 2001 From: Ulf Norell Date: Mon, 9 Sep 2019 12:33:47 +0200 Subject: [PATCH] Don't forget to solve constraints --- src/aeso_ast_infer_types.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/aeso_ast_infer_types.erl b/src/aeso_ast_infer_types.erl index 7b725de..fef1e60 100644 --- a/src/aeso_ast_infer_types.erl +++ b/src/aeso_ast_infer_types.erl @@ -899,7 +899,6 @@ infer_nonrec(Env, LetFun) -> create_constraints(), NewLetFun = infer_letfun(Env, LetFun), check_special_funs(Env, NewLetFun), - solve_constraints(Env), destroy_and_report_unsolved_constraints(Env), Result = {TypeSig, _} = instantiate(NewLetFun), print_typesig(TypeSig), @@ -1491,12 +1490,10 @@ create_constraints() -> create_bytes_constraints(), create_field_constraints(). -solve_constraints(Env) -> +destroy_and_report_unsolved_constraints(Env) -> solve_named_argument_constraints(Env), solve_bytes_constraints(Env), - solve_field_constraints(Env). - -destroy_and_report_unsolved_constraints(Env) -> + solve_field_constraints(Env), destroy_and_report_unsolved_field_constraints(Env), destroy_and_report_unsolved_bytes_constraints(Env), destroy_and_report_unsolved_named_argument_constraints(Env).