From 8fefeb8a1738a3be87bd7c324a07ae866d958112 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 16 Apr 2014 12:40:05 +0200 Subject: 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. --- lib/stdlib/src/erl_lint.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/stdlib/src') 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). -- cgit v1.2.3