diff options
author | Fredrik Gustafsson <[email protected]> | 2013-03-08 11:09:48 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-03-08 11:09:48 +0100 |
commit | a9712e121e9bea8906a54b3016cb41ebf1c115f2 (patch) | |
tree | 20e6222e3812b07f413d90a48f66388233506508 /lib/dialyzer/src/dialyzer_contracts.erl | |
parent | 32b94d26ddc2de3a09ee47c4e337a2ffba690b7b (diff) | |
parent | 412ca8f432af37876f8462c47ce91cda08e575d6 (diff) | |
download | otp-a9712e121e9bea8906a54b3016cb41ebf1c115f2.tar.gz otp-a9712e121e9bea8906a54b3016cb41ebf1c115f2.tar.bz2 otp-a9712e121e9bea8906a54b3016cb41ebf1c115f2.zip |
Merge branch 'mh/dialyzer-overlapping-warning/OTP-10918' into maint
* mh/dialyzer-overlapping-warning/OTP-10918:
Include module, function and arity in Dialyzer's "overlapping domain" warnings
Diffstat (limited to 'lib/dialyzer/src/dialyzer_contracts.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_contracts.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl index 157c951f77..410be8586e 100644 --- a/lib/dialyzer/src/dialyzer_contracts.erl +++ b/lib/dialyzer/src/dialyzer_contracts.erl @@ -520,6 +520,8 @@ get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left], case check_contract(Contract, Sig) of {error, invalid_contract} -> [invalid_contract_warning(MFA, FileLine, Sig, RecDict)|Acc]; + {error, {overlapping_contract, []}} -> + [overlapping_contract_warning(MFA, FileLine)|Acc]; {error, {extra_range, ExtraRanges, STRange}} -> Warn = case t_from_forms_without_remote(Contract#contract.forms, @@ -571,6 +573,9 @@ invalid_contract_warning({M, F, A}, FileLine, SuccType, RecDict) -> SuccTypeStr = dialyzer_utils:format_sig(SuccType, RecDict), {?WARN_CONTRACT_TYPES, FileLine, {invalid_contract, [M, F, A, SuccTypeStr]}}. +overlapping_contract_warning({M, F, A}, FileLine) -> + {?WARN_CONTRACT_TYPES, FileLine, {overlapping_contract, [M, F, A]}}. + extra_range_warning({M, F, A}, FileLine, ExtraRanges, STRange) -> ERangesStr = erl_types:t_to_string(ExtraRanges), STRangeStr = erl_types:t_to_string(STRange), |