Tell dialyzer to bugger off
This commit is contained in:
parent
30de1db163
commit
0b56691533
@ -1459,6 +1459,8 @@ get_attributes(Ann) ->
|
|||||||
indexed(Xs) ->
|
indexed(Xs) ->
|
||||||
lists:zip(lists:seq(1, length(Xs)), Xs).
|
lists:zip(lists:seq(1, length(Xs)), Xs).
|
||||||
|
|
||||||
|
-dialyzer({nowarn_function, [fcode_error/1, internal_error/1]}).
|
||||||
|
|
||||||
fcode_error(Error) ->
|
fcode_error(Error) ->
|
||||||
aeso_errors:throw(aeso_code_errors:format(Error)).
|
aeso_errors:throw(aeso_code_errors:format(Error)).
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ code([], Icode, Options) ->
|
|||||||
|
|
||||||
%% Generate error on correct format.
|
%% Generate error on correct format.
|
||||||
|
|
||||||
|
-dialyzer({nowarn_function, gen_error/1}).
|
||||||
gen_error(Error) ->
|
gen_error(Error) ->
|
||||||
aeso_errors:throw(aeso_code_errors:format(Error)).
|
aeso_errors:throw(aeso_code_errors:format(Error)).
|
||||||
|
|
||||||
@ -731,6 +732,7 @@ eta_expand(Id = {_, Ann0, _}, {fun_t, _, _, ArgsT, _}, Icode) ->
|
|||||||
check_monomorphic_map({typed, Ann, _, MapType}, Icode) ->
|
check_monomorphic_map({typed, Ann, _, MapType}, Icode) ->
|
||||||
check_monomorphic_map(Ann, MapType, Icode).
|
check_monomorphic_map(Ann, MapType, Icode).
|
||||||
|
|
||||||
|
-dialyzer({nowarn_function, check_monomorphic_map/3}).
|
||||||
check_monomorphic_map(Ann, ?map_t(KeyType, ValType), _Icode) ->
|
check_monomorphic_map(Ann, ?map_t(KeyType, ValType), _Icode) ->
|
||||||
Err = fun(Why) -> gen_error({invalid_map_key_type, Why, Ann, KeyType}) end,
|
Err = fun(Why) -> gen_error({invalid_map_key_type, Why, Ann, KeyType}) end,
|
||||||
[ Err(polymorphic) || not is_monomorphic(KeyType) ],
|
[ Err(polymorphic) || not is_monomorphic(KeyType) ],
|
||||||
|
@ -50,6 +50,7 @@ pos(Line, Col) ->
|
|||||||
pos(File, Line, Col) ->
|
pos(File, Line, Col) ->
|
||||||
#pos{ file = File, line = Line, col = Col }.
|
#pos{ file = File, line = Line, col = Col }.
|
||||||
|
|
||||||
|
-spec throw(_) -> ok | no_return().
|
||||||
throw([]) -> ok;
|
throw([]) -> ok;
|
||||||
throw(Errs) when is_list(Errs) ->
|
throw(Errs) when is_list(Errs) ->
|
||||||
erlang:throw({error, Errs});
|
erlang:throw({error, Errs});
|
||||||
|
@ -33,10 +33,10 @@ string(String, Included, Opts) ->
|
|||||||
{ok, AST} ->
|
{ok, AST} ->
|
||||||
case expand_includes(AST, Included, Opts) of
|
case expand_includes(AST, Included, Opts) of
|
||||||
{ok, AST1} -> AST1;
|
{ok, AST1} -> AST1;
|
||||||
{error, Err} -> aeso_errors:throw(mk_error(Err))
|
{error, Err} -> parse_error(Err)
|
||||||
end;
|
end;
|
||||||
{error, Err} ->
|
{error, Err} ->
|
||||||
aeso_errors:throw(mk_error(Err))
|
parse_error(Err)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
type(String) ->
|
type(String) ->
|
||||||
@ -52,6 +52,10 @@ parse_and_scan(P, S, Opts) ->
|
|||||||
Error -> Error
|
Error -> Error
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
-dialyzer({nowarn_function, parse_error/1}).
|
||||||
|
parse_error(Err) ->
|
||||||
|
aeso_errors:throw(mk_error(Err)).
|
||||||
|
|
||||||
mk_p_err(Pos, Msg) ->
|
mk_p_err(Pos, Msg) ->
|
||||||
aeso_errors:new(parse_error, mk_pos(Pos), lists:flatten(Msg)).
|
aeso_errors:new(parse_error, mk_pos(Pos), lists:flatten(Msg)).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user