diff options
author | Hans Bolinder <[email protected]> | 2016-04-08 12:13:57 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-04-18 13:17:17 +0200 |
commit | 7986d60dac9687b3aef3115f0dccc86003a681e6 (patch) | |
tree | b370c3037e61073b0d060a4cf938856b3dff17b0 /lib/stdlib/src | |
parent | ec828d3981e59e746a58977034d1020be3ff8915 (diff) | |
download | otp-7986d60dac9687b3aef3115f0dccc86003a681e6.tar.gz otp-7986d60dac9687b3aef3115f0dccc86003a681e6.tar.bz2 otp-7986d60dac9687b3aef3115f0dccc86003a681e6.zip |
stdlib: The type map() is built-in
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/erl_lint.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 4ca9a609a8..7e5535f41e 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -2714,8 +2714,6 @@ check_type(Types, St) -> check_type({ann_type, _L, [_Var, Type]}, SeenVars, St) -> check_type(Type, SeenVars, St); -check_type({paren_type, _L, [Type]}, SeenVars, St) -> - check_type(Type, SeenVars, St); check_type({remote_type, L, [{atom, _, Mod}, {atom, _, Name}, Args]}, SeenVars, St0) -> St = deprecated_type(L, Mod, Name, Args, St0), @@ -2755,10 +2753,8 @@ check_type({type, L, range, [From, To]}, SeenVars, St) -> _ -> add_error(L, {type_syntax, range}, St) end, {SeenVars, St1}; -check_type({type, L, map, any}, SeenVars, St) -> - %% To get usage right while map/0 is a newly_introduced_builtin_type. - St1 = used_type({map, 0}, L, St), - {SeenVars, St1}; +check_type({type, _L, map, any}, SeenVars, St) -> + {SeenVars, St}; check_type({type, _L, map, Pairs}, SeenVars, St) -> lists:foldl(fun(Pair, {AccSeenVars, AccSt}) -> check_type(Pair, AccSeenVars, AccSt) @@ -2866,7 +2862,6 @@ used_type(TypePair, L, #lint{usage = Usage, file = File} = St) -> is_default_type({Name, NumberOfTypeVariables}) -> erl_internal:is_type(Name, NumberOfTypeVariables). -is_newly_introduced_builtin_type({map, 0}) -> true; is_newly_introduced_builtin_type({Name, _}) when is_atom(Name) -> false. is_obsolete_builtin_type(TypePair) -> |