Remove found_void error
This commit is contained in:
parent
6b309c9381
commit
4645b279fa
@ -475,8 +475,6 @@ type_to_fcode(Env, Sub, {record_t, Fields}) ->
|
|||||||
type_to_fcode(Env, Sub, {tuple_t, [], lists:map(FieldType, Fields)});
|
type_to_fcode(Env, Sub, {tuple_t, [], lists:map(FieldType, Fields)});
|
||||||
type_to_fcode(_Env, _Sub, {bytes_t, _, N}) ->
|
type_to_fcode(_Env, _Sub, {bytes_t, _, N}) ->
|
||||||
{bytes, N};
|
{bytes, N};
|
||||||
type_to_fcode(_Env, _Sub, {tvar, Ann, "void"}) ->
|
|
||||||
fcode_error({found_void, Ann});
|
|
||||||
type_to_fcode(_Env, Sub, {tvar, _, X}) ->
|
type_to_fcode(_Env, Sub, {tvar, _, X}) ->
|
||||||
maps:get(X, Sub, {tvar, X});
|
maps:get(X, Sub, {tvar, X});
|
||||||
type_to_fcode(_Env, _Sub, {fun_t, Ann, _, var_args, _}) ->
|
type_to_fcode(_Env, _Sub, {fun_t, Ann, _, var_args, _}) ->
|
||||||
|
@ -42,8 +42,6 @@ format({var_args_not_set, Expr}) ->
|
|||||||
mk_err( pos(Expr), "Could not deduce type of variable arguments list"
|
mk_err( pos(Expr), "Could not deduce type of variable arguments list"
|
||||||
, "When compiling " ++ pp_expr(Expr)
|
, "When compiling " ++ pp_expr(Expr)
|
||||||
);
|
);
|
||||||
format({found_void, Ann}) ->
|
|
||||||
mk_err(pos(Ann), "Found a void-typed value.", "`void` is a restricted, uninhabited type. Did you mean `unit`?");
|
|
||||||
|
|
||||||
format(Err) ->
|
format(Err) ->
|
||||||
mk_err(aeso_errors:pos(0, 0), io_lib:format("Unknown error: ~p\n", [Err])).
|
mk_err(aeso_errors:pos(0, 0), io_lib:format("Unknown error: ~p\n", [Err])).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user