diff options
author | Hans Bolinder <[email protected]> | 2018-02-23 12:42:21 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-02-23 12:42:21 +0100 |
commit | b3fd7dc1b52520065e9dc977195608baf1f206ce (patch) | |
tree | 8f9a8ef13eea2853ca8db2e0c39057f1dbe1bd66 /lib/dialyzer/src | |
parent | a2f649fcf458c4102b3551eef401360d5078b733 (diff) | |
parent | 40a3cb7a4657175e5f385d326a63ef012f51585d (diff) | |
download | otp-b3fd7dc1b52520065e9dc977195608baf1f206ce.tar.gz otp-b3fd7dc1b52520065e9dc977195608baf1f206ce.tar.bz2 otp-b3fd7dc1b52520065e9dc977195608baf1f206ce.zip |
Merge branch 'hasse/dialyzer/fix_opaque_bug/OTP-14925/ERL-565' into maint
* hasse/dialyzer/fix_opaque_bug/OTP-14925/ERL-565:
dialyzer: Correct a parameterized opaque types bug
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r-- | lib/dialyzer/src/dialyzer_dataflow.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl index fca5b74a9e..ea3523a965 100644 --- a/lib/dialyzer/src/dialyzer_dataflow.erl +++ b/lib/dialyzer/src/dialyzer_dataflow.erl @@ -3443,19 +3443,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), |