aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-11-30 20:19:31 +0100
committerStavros Aronis <[email protected]>2011-12-01 11:55:09 +0100
commit9949c1e03cdde87548371d5a9b53a997e3088dc6 (patch)
treeae512f43e1e7fb0b0160b641ff586579bd93e965 /lib/dialyzer
parent0290bed50ccbba067619c5829b0a090a8a60a2ff (diff)
downloadotp-9949c1e03cdde87548371d5a9b53a997e3088dc6.tar.gz
otp-9949c1e03cdde87548371d5a9b53a997e3088dc6.tar.bz2
otp-9949c1e03cdde87548371d5a9b53a997e3088dc6.zip
Fix crash in Dialyzer
Variable substitution was not generalizing any unknown variables.
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maybe_improper.erl7
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl
index 92868b6878..4268814859 100644
--- a/lib/dialyzer/src/dialyzer_typesig.erl
+++ b/lib/dialyzer/src/dialyzer_typesig.erl
@@ -2046,8 +2046,7 @@ lookup_type(Key, Map) ->
%% case cerl:is_literal(Key) of
%% true -> t_from_term(cerl:concrete(Key));
%% false ->
- Subst = t_subst(Key, Map),
- t_sup(Subst, Subst).
+ t_subst(Key, Map).
%% end.
mk_var(Var) ->
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maybe_improper.erl b/lib/dialyzer/test/small_SUITE_data/src/maybe_improper.erl
new file mode 100644
index 0000000000..1743d81493
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maybe_improper.erl
@@ -0,0 +1,7 @@
+-module(maybe_improper).
+
+-export([s/1]).
+
+-spec s(maybe_improper_list(X,Y)) -> {[X], maybe_improper_list(X,Y)}.
+s(A) ->
+ lists:split(2,A).