diff options
author | Hans Bolinder <[email protected]> | 2018-01-23 11:34:18 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-01-23 11:34:18 +0100 |
commit | dc6a03a8351819a91c1e9235dd84df0acd4ba6b8 (patch) | |
tree | 0dfd2c3c3cbf86656929d5a0e140f7825fc8d1dd /lib/dialyzer | |
parent | 7a37e39d45597a25ff532751c5131938b5286331 (diff) | |
parent | 6deabadcda913b4fd7f3d209e4344f0b0f736e85 (diff) | |
download | otp-dc6a03a8351819a91c1e9235dd84df0acd4ba6b8.tar.gz otp-dc6a03a8351819a91c1e9235dd84df0acd4ba6b8.tar.bz2 otp-dc6a03a8351819a91c1e9235dd84df0acd4ba6b8.zip |
Merge branch 'hasse/kernel-stdlib/fix_contracts/OTP-14889' into maint
* hasse/kernel-stdlib/fix_contracts/OTP-14889:
kernel: Correct contracts and a bug in group_history
stdlib: Correct contracts
dialyzer: Optimize handling of a lot of warnings
Diffstat (limited to 'lib/dialyzer')
-rw-r--r-- | lib/dialyzer/src/dialyzer_dataflow.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl index 8367432ac5..f6433a807d 100644 --- a/lib/dialyzer/src/dialyzer_dataflow.erl +++ b/lib/dialyzer/src/dialyzer_dataflow.erl @@ -3116,7 +3116,10 @@ state__add_warning(#state{warnings = Warnings, warning_mode = true} = State, state__remove_added_warnings(OldState, NewState) -> #state{warnings = OldWarnings} = OldState, #state{warnings = NewWarnings} = NewState, - {NewWarnings -- OldWarnings, NewState#state{warnings = OldWarnings}}. + case NewWarnings =:= OldWarnings of + true -> {[], NewState}; + false -> {NewWarnings -- OldWarnings, NewState#state{warnings = OldWarnings}} + end. state__add_warnings(Warns, #state{warnings = Warnings} = State) -> State#state{warnings = Warns ++ Warnings}. |