aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_behaviours.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-11-29 18:17:50 +0100
committerStavros Aronis <[email protected]>2011-12-01 11:55:09 +0100
commit3f55d396eed67ce75b35aa0be4d8b1a456f174de (patch)
tree0a94e35d75f2d95c4ebdc534922db0f98c93c4f2 /lib/dialyzer/src/dialyzer_behaviours.erl
parent9949c1e03cdde87548371d5a9b53a997e3088dc6 (diff)
downloadotp-3f55d396eed67ce75b35aa0be4d8b1a456f174de.tar.gz
otp-3f55d396eed67ce75b35aa0be4d8b1a456f174de.tar.bz2
otp-3f55d396eed67ce75b35aa0be4d8b1a456f174de.zip
Fix bug in Dialyzer's behaviours analysis
Diffstat (limited to 'lib/dialyzer/src/dialyzer_behaviours.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_behaviours.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer_behaviours.erl b/lib/dialyzer/src/dialyzer_behaviours.erl
index 56eb46d78a..6295a5259e 100644
--- a/lib/dialyzer/src/dialyzer_behaviours.erl
+++ b/lib/dialyzer/src/dialyzer_behaviours.erl
@@ -144,8 +144,11 @@ check_all_callbacks(Module, Behaviour, [Cb|Rest],
'error' -> Acc1;
{ok, {{File, Line}, Contract}} ->
Acc10 = Acc1,
- SpecReturnType = dialyzer_contracts:get_contract_return(Contract),
- SpecArgTypes = dialyzer_contracts:get_contract_args(Contract),
+ SpecReturnType0 = dialyzer_contracts:get_contract_return(Contract),
+ SpecArgTypes0 = dialyzer_contracts:get_contract_args(Contract),
+ SpecReturnType = erl_types:subst_all_vars_to_any(SpecReturnType0),
+ SpecArgTypes =
+ [erl_types:subst_all_vars_to_any(ArgT0) || ArgT0 <- SpecArgTypes0],
Acc11 =
case erl_types:t_is_subtype(SpecReturnType, CbReturnType) of
true -> Acc10;