aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-04-20 09:40:26 +0200
committerHans Bolinder <[email protected]>2016-04-20 09:40:26 +0200
commit17f8a6871e3503a670bd2d8ee44ead839f914bd8 (patch)
treefc0d7b0b2be98f735bd65128f0d2c8798af7f981
parent58c0f8de7a27a659fe2b534a86752f67da1af998 (diff)
parentc9a6ac443351f8683d06764d68e4a53521d9371a (diff)
downloadotp-17f8a6871e3503a670bd2d8ee44ead839f914bd8.tar.gz
otp-17f8a6871e3503a670bd2d8ee44ead839f914bd8.tar.bz2
otp-17f8a6871e3503a670bd2d8ee44ead839f914bd8.zip
Merge branch 'hasse/map_0_is_builtin/OTP-13153'
* hasse/map_0_is_builtin/OTP-13153: stdlib: Fix warnings
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl12
-rw-r--r--lib/stdlib/src/erl_lint.erl2
2 files changed, 2 insertions, 12 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl
deleted file mode 100644
index 70059f73b6..0000000000
--- a/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl
+++ /dev/null
@@ -1,12 +0,0 @@
--module(maps_redef).
-
--export([t/0]).
-
-%% OK in Erlang/OTP 17, at least.
-
--type map() :: atom(). % redefine built-in type
-
--spec t() -> map().
-
-t() ->
- a. % OK
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 7e5535f41e..b14102ac38 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2653,6 +2653,8 @@ find_field(_F, []) -> error.
%% Attr :: 'type' | 'opaque'
%% Checks that a type definition is valid.
+-dialyzer({no_match, type_def/6}).
+
type_def(Attr, Line, TypeName, ProtoType, Args, St0) ->
TypeDefs = St0#lint.types,
Arity = length(Args),