aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-11-30 14:06:20 +0100
committerStavros Aronis <[email protected]>2011-12-01 11:55:10 +0100
commitfeeaaadd6101b57a9e1b044f4dc3001e9c475c44 (patch)
tree2302dbdf79dd88f5aa22150794e7dbaf8136d6bb /lib/dialyzer/src
parentcf40c6ad4edfb34aa6c44a29de66f63d2779c38f (diff)
downloadotp-feeaaadd6101b57a9e1b044f4dc3001e9c475c44.tar.gz
otp-feeaaadd6101b57a9e1b044f4dc3001e9c475c44.tar.bz2
otp-feeaaadd6101b57a9e1b044f4dc3001e9c475c44.zip
Refine warning about callback specs with extra ranges
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r--lib/dialyzer/src/dialyzer_behaviours.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/dialyzer/src/dialyzer_behaviours.erl b/lib/dialyzer/src/dialyzer_behaviours.erl
index 6295a5259e..900ddf28c5 100644
--- a/lib/dialyzer/src/dialyzer_behaviours.erl
+++ b/lib/dialyzer/src/dialyzer_behaviours.erl
@@ -152,10 +152,12 @@ check_all_callbacks(Module, Behaviour, [Cb|Rest],
Acc11 =
case erl_types:t_is_subtype(SpecReturnType, CbReturnType) of
true -> Acc10;
- false -> [{callback_spec_type_mismatch,
- [File, Line, Behaviour, Function, Arity,
- erl_types:t_to_string(SpecReturnType, Records),
- erl_types:t_to_string(CbReturnType, Records)]}|Acc10]
+ false ->
+ ExtraType = erl_types:t_subtract(SpecReturnType, CbReturnType),
+ [{callback_spec_type_mismatch,
+ [File, Line, Behaviour, Function, Arity,
+ erl_types:t_to_string(ExtraType, Records),
+ erl_types:t_to_string(CbReturnType, Records)]}|Acc10]
end,
Acc12 =
case erl_types:any_none(