Change the error message for unify_varargs

This commit is contained in:
Gaith Hallak 2022-11-01 18:38:18 +03:00
parent 78666e803b
commit 5d162dd7b0
2 changed files with 3 additions and 3 deletions

View File

@ -3627,7 +3627,7 @@ mk_error({multiple_main_contracts, Ann}) ->
Msg = "Only one main contract can be defined.", Msg = "Only one main contract can be defined.",
mk_t_err(pos(Ann), Msg); mk_t_err(pos(Ann), Msg);
mk_error({unify_varargs, When}) -> mk_error({unify_varargs, When}) ->
Msg = "Cannot unify variable argument list.", Msg = "Cannot infer types for variable argument list.",
{Pos, Ctxt} = pp_when(When), {Pos, Ctxt} = pp_when(When),
mk_t_err(Pos, Msg, Ctxt); mk_t_err(Pos, Msg, Ctxt);
mk_error({clone_no_contract, Ann}) -> mk_error({clone_no_contract, Ann}) ->

View File

@ -1141,12 +1141,12 @@ failing_contracts() ->
]) ])
, ?TYPE_ERROR(var_args_unify_let, , ?TYPE_ERROR(var_args_unify_let,
[<<?Pos(3,9) [<<?Pos(3,9)
"Cannot unify variable argument list.\n" "Cannot infer types for variable argument list.\n"
"when checking the type of the pattern `x : 'a` against the expected type `(gas : int, value : int, protected : bool, ref : 'b, var_args) => 'b`">> "when checking the type of the pattern `x : 'a` against the expected type `(gas : int, value : int, protected : bool, ref : 'b, var_args) => 'b`">>
]) ])
, ?TYPE_ERROR(var_args_unify_fun_call, , ?TYPE_ERROR(var_args_unify_fun_call,
[<<?Pos(6,5) [<<?Pos(6,5)
"Cannot unify variable argument list.\n" "Cannot infer types for variable argument list.\n"
"when checking the application of\n" "when checking the application of\n"
" `g : (() => 'b) => 'b`\n" " `g : (() => 'b) => 'b`\n"
"to arguments\n" "to arguments\n"