diff options
Diffstat (limited to 'lib/dialyzer')
-rw-r--r-- | lib/dialyzer/doc/src/notes.xml | 28 | ||||
-rw-r--r-- | lib/dialyzer/src/dialyzer.erl | 7 | ||||
-rw-r--r-- | lib/dialyzer/src/dialyzer_contracts.erl | 5 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/contract3 | 4 | ||||
-rw-r--r-- | lib/dialyzer/vsn.mk | 2 |
5 files changed, 40 insertions, 6 deletions
diff --git a/lib/dialyzer/doc/src/notes.xml b/lib/dialyzer/doc/src/notes.xml index d8a361affe..cd809662f2 100644 --- a/lib/dialyzer/doc/src/notes.xml +++ b/lib/dialyzer/doc/src/notes.xml @@ -31,6 +31,34 @@ <p>This document describes the changes made to the Dialyzer application.</p> +<section><title>Dialyzer 2.6</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> Miscellaneous updates due to Unicode support. </p> + <p> + Own Id: OTP-10820</p> + </item> + <item> + <p> + User defined types with same name and different arity and + documentation inconsistencies. Thanks Stavros Aronis.</p> + <p> + Own Id: OTP-10861</p> + </item> + <item> + <p> + Native code compilation changes. Thanks to Kostis + Sagonas.</p> + <p> + Own Id: OTP-10865</p> + </item> + </list> + </section> + +</section> + <section><title>Dialyzer 2.5.4</title> <section><title>Improvements and New Features</title> diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl index 63c51e219a..be4b9b6e12 100644 --- a/lib/dialyzer/src/dialyzer.erl +++ b/lib/dialyzer/src/dialyzer.erl @@ -409,9 +409,10 @@ message_to_string({extra_range, [M, F, A, ExtraRanges, SigRange]}) -> io_lib:format("The specification for ~w:~w/~w states that the function" " might also return ~s but the inferred return is ~s\n", [M, F, A, ExtraRanges, SigRange]); -message_to_string({overlapping_contract, []}) -> - "Overloaded contract has overlapping domains;" - " such contracts are currently unsupported and are simply ignored\n"; +message_to_string({overlapping_contract, [M, F, A]}) -> + io_lib:format("Overloaded contract for ~w:~w/~w has overlapping domains;" + " such contracts are currently unsupported and are simply ignored\n", + [M, F, A]); message_to_string({spec_missing_fun, [M, F, A]}) -> io_lib:format("Contract for function that does not exist: ~w:~w/~w\n", [M, F, A]); 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), diff --git a/lib/dialyzer/test/small_SUITE_data/results/contract3 b/lib/dialyzer/test/small_SUITE_data/results/contract3 index 44b49e745a..6e111f87d9 100644 --- a/lib/dialyzer/test/small_SUITE_data/results/contract3 +++ b/lib/dialyzer/test/small_SUITE_data/results/contract3 @@ -1,3 +1,3 @@ -contract3.erl:17: Overloaded contract has overlapping domains; such contracts are currently unsupported and are simply ignored -contract3.erl:29: Overloaded contract has overlapping domains; such contracts are currently unsupported and are simply ignored +contract3.erl:17: Overloaded contract for contract3:t1/1 has overlapping domains; such contracts are currently unsupported and are simply ignored +contract3.erl:29: Overloaded contract for contract3:t3/3 has overlapping domains; such contracts are currently unsupported and are simply ignored diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk index d4c45f3842..bdb8692f8a 100644 --- a/lib/dialyzer/vsn.mk +++ b/lib/dialyzer/vsn.mk @@ -1 +1 @@ -DIALYZER_VSN = 2.5.4 +DIALYZER_VSN = 2.6 |