Report Obsolete diagnostics on operators involved in tuple equality#27178
Merged
jcouv merged 1 commit intodotnet:masterfrom May 30, 2018
Merged
Report Obsolete diagnostics on operators involved in tuple equality#27178jcouv merged 1 commit intodotnet:masterfrom
jcouv merged 1 commit intodotnet:masterfrom
Conversation
Contributor
Is this consistent with behavior of regular comparison operators? |
Member
Author
|
Yes, the errors are consistent with regular comparison. |
Member
Author
|
@dotnet/roslyn-compiler for a second review (small fix). Thanks I've started internal thread with compat council to approve this compat break. |
Member
Author
|
This breaking change was approved by the compat council. |
Member
|
approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Customer scenario
Mark some implicit conversion operators, comparison or truth operators as obsolete. Then write a tuple comparison expression that involves those operators.
In 15.7 tuple comparisons failed to report such obsolete diagnostics.
In 15.8, we will properly report those diagnostics. This is a small compat break which will be reviewed with the compat council.
Bugs this fixes
Fixes #27047
Risk
Performance impact
Low. The change is localized to tuple binding and leveraging a common helper to check for obsolete conversions and report on them.
Is this a regression from a previous update?
No. This is a bug in the tuple-equality feature (in C# 7.3, shipped in 15.7).
How was the bug found?
Reported by customer