aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_contracts.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-08-21 08:57:23 +0200
committerHans Bolinder <[email protected]>2014-08-21 08:57:23 +0200
commitdaed987f7ebae3fc8f969b4f55f225837267411b (patch)
tree1b795507c5c1a4eff77ddf0991669a71154b9e67 /lib/dialyzer/src/dialyzer_contracts.erl
parentc56edba2912e12f15226a1e130fdfac25c29b98f (diff)
parent6e422d499fe079b87cfa226491b11016f36b9a31 (diff)
downloadotp-daed987f7ebae3fc8f969b4f55f225837267411b.tar.gz
otp-daed987f7ebae3fc8f969b4f55f225837267411b.tar.bz2
otp-daed987f7ebae3fc8f969b4f55f225837267411b.zip
Merge branch 'hb/dialyzer/bugfix/OTP-12111' into maint
* hb/dialyzer/bugfix/OTP-12111: dialyzer: fix a -Wunderspecs bug
Diffstat (limited to 'lib/dialyzer/src/dialyzer_contracts.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_contracts.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl
index 1d2dfc7b2d..f27fc1a842 100644
--- a/lib/dialyzer/src/dialyzer_contracts.erl
+++ b/lib/dialyzer/src/dialyzer_contracts.erl
@@ -20,8 +20,6 @@
-module(dialyzer_contracts).
--compile(export_all).
-
-export([check_contract/2,
check_contracts/4,
contracts_without_fun/3,
@@ -686,7 +684,7 @@ picky_contract_check(CSig0, Sig0, MFA, FileLine, Contract, RecDict, Acc) ->
true -> Acc;
false ->
case extra_contract_warning(MFA, FileLine, Contract,
- CSig, Sig, RecDict) of
+ CSig0, Sig0, RecDict) of
no_warning -> Acc;
{warning, Warning} -> [Warning|Acc]
end
@@ -752,7 +750,8 @@ is_remote_types_related(Contract, CSig, Sig, RecDict) ->
t_from_forms_without_remote([{FType, []}], RecDict) ->
Type0 = erl_types:t_from_form(FType, RecDict),
- {ok, erl_types:subst_all_remote(Type0, erl_types:t_none())};
+ Type1 = erl_types:subst_all_remote(Type0, erl_types:t_none()),
+ {ok, erl_types:subst_all_vars_to_any(Type1)};
t_from_forms_without_remote([{_FType, _Constrs}], _RecDict) ->
%% 'When' constraints
unsupported;