aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-05-16 16:46:55 +0200
committerHans Bolinder <[email protected]>2017-05-22 15:21:49 +0200
commit0ec564035fb5de2c42ebb69be1d61933c79b4019 (patch)
tree04f8f90665531d06f6eb526d9f1feced86cacbe8 /lib/hipe/cerl
parentb537048c96bc340fad6c995f1cac8026674835e4 (diff)
downloadotp-0ec564035fb5de2c42ebb69be1d61933c79b4019.tar.gz
otp-0ec564035fb5de2c42ebb69be1d61933c79b4019.tar.bz2
otp-0ec564035fb5de2c42ebb69be1d61933c79b4019.zip
dialyzer: Warn for bad type variables of parameterized types
As of commit 854ee8b (Erlang/OTP 18) warnings about using '_' as type variable in parameterized types have not been output. The code of erl_types:t_var_names() is corrected. The spec is also corrected (thanks to Kostis for pointing out the bug).
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_types.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index ea8cc1677d..4cfa80f153 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -5171,9 +5171,9 @@ cache_put(Key, Type, DeltaL, #cache{types = Types} = Cache) ->
NewTypes = maps:put(Key, {Type, DeltaL}, Types),
Cache#cache{types = NewTypes}.
--spec t_var_names([erl_type()]) -> [atom()].
+-spec t_var_names([parse_form()]) -> [atom()].
-t_var_names([{var, _, Name}|L]) when L =/= '_' ->
+t_var_names([{var, _, Name}|L]) when Name =/= '_' ->
[Name|t_var_names(L)];
t_var_names([]) ->
[].