aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_dataflow.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-02-23 12:45:26 +0100
committerHans Bolinder <[email protected]>2018-02-23 12:45:26 +0100
commitfe19dd4829cbb4014847ac4296e063c205aa93f8 (patch)
tree4535e578440b7150ea7bc259568985a34547c6c1 /lib/dialyzer/src/dialyzer_dataflow.erl
parent897c82097348b33383e62bcf0ecc236132d7a2cc (diff)
parentb3fd7dc1b52520065e9dc977195608baf1f206ce (diff)
downloadotp-fe19dd4829cbb4014847ac4296e063c205aa93f8.tar.gz
otp-fe19dd4829cbb4014847ac4296e063c205aa93f8.tar.bz2
otp-fe19dd4829cbb4014847ac4296e063c205aa93f8.zip
Merge branch 'maint'
* maint: dialyzer: Correct a parameterized opaque types bug
Diffstat (limited to 'lib/dialyzer/src/dialyzer_dataflow.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 6bd3c2f9a6..c5f93a3392 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -3444,19 +3444,19 @@ state__fun_info(Fun, #state{callgraph = CG, fun_tab = FunTab, plt = PLT}) ->
{Fun, Sig, Contract, LocalRet}.
forward_args(Fun, ArgTypes, #state{work = Work, fun_tab = FunTab} = State) ->
- {OldArgTypes, OldOut, Fixpoint} =
+ {NewArgTypes, OldOut, Fixpoint} =
case dict:find(Fun, FunTab) of
- {ok, {not_handled, {OldArgTypes0, OldOut0}}} ->
- {OldArgTypes0, OldOut0, false};
+ {ok, {not_handled, {_OldArgTypesAreNone, OldOut0}}} ->
+ {ArgTypes, OldOut0, false};
{ok, {OldArgTypes0, OldOut0}} ->
- {OldArgTypes0, OldOut0,
- t_is_subtype(t_product(ArgTypes), t_product(OldArgTypes0))}
+ NewArgTypes0 = [t_sup(X, Y) ||
+ {X, Y} <- lists:zip(ArgTypes, OldArgTypes0)],
+ {NewArgTypes0, OldOut0,
+ t_is_equal(t_product(NewArgTypes0), t_product(OldArgTypes0))}
end,
case Fixpoint of
true -> State;
false ->
- NewArgTypes = [t_sup(X, Y) ||
- {X, Y} <- lists:zip(ArgTypes, OldArgTypes)],
NewWork = add_work(Fun, Work),
?debug("~tw: forwarding args ~ts\n",
[state__lookup_name(Fun, State),