summaryrefslogtreecommitdiff
path: root/lib/stdlib/src/erl_lint.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2023-03-13 14:02:41 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2023-03-15 10:08:39 +0100
commitf7c11e4e4c4e9c11bf0c319fe24c5491de30120e (patch)
treea4867304b0d010a014435cd8fd854b6e7e7e61a4 /lib/stdlib/src/erl_lint.erl
parenta8476649e58890ffd0d0ab9737684935b00636c7 (diff)
downloaderlang-f7c11e4e4c4e9c11bf0c319fe24c5491de30120e.tar.gz
Eliminate false warning for re-defined and unused type
Closes #6997
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r--lib/stdlib/src/erl_lint.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 728f82b518..959c04184a 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -3066,7 +3066,12 @@ check_type_2({type, Anno, TypeName, Args}, SeenVars, St) ->
add_warning(Anno, W, St)
end;
_ ->
- St
+ case is_default_type(TypePair) of
+ true ->
+ used_type(TypePair, Anno, St);
+ false ->
+ St
+ end
end,
check_type_2({type, nowarn(), product, Args}, SeenVars, St1);
check_type_2({user_type, A, TypeName, Args}, SeenVars, St) ->