diff options
author | Hans Bolinder <[email protected]> | 2014-04-16 12:40:05 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2014-04-16 12:40:05 +0200 |
commit | 8fefeb8a1738a3be87bd7c324a07ae866d958112 (patch) | |
tree | 7895893b3d5d1621a448c40a5a2ca30ef088118d /lib/stdlib/src | |
parent | b8494d9b7362f1edfb87f2dbd9f12e316ac71c1e (diff) | |
download | otp-8fefeb8a1738a3be87bd7c324a07ae866d958112.tar.gz otp-8fefeb8a1738a3be87bd7c324a07ae866d958112.tar.bz2 otp-8fefeb8a1738a3be87bd7c324a07ae866d958112.zip |
stdlib: Fix error message when exporting (redefined) map() type
When redefining and exporting the type map() erl_lint erroneously
emitted an error. This bug has been fixed.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/erl_lint.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 7c064ce902..39cc03cf7a 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -1046,9 +1046,10 @@ check_undefined_types(#lint{usage=Usage,types=Def}=St0) -> Used = Usage#usage.used_types, UTAs = dict:fetch_keys(Used), Undef = [{TA,dict:fetch(TA, Used)} || - TA <- UTAs, + {T,_}=TA <- UTAs, not dict:is_key(TA, Def), - not is_default_type(TA)], + not is_default_type(TA), + not is_newly_introduced_var_arity_type(T)], foldl(fun ({TA,L}, St) -> add_error(L, {undefined_type,TA}, St) end, St0, Undef). |