-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitting binding code for Decontsruct into separate file #11983
Conversation
@dotnet/roslyn-compiler team for review. This is just splitting the Deconstruct binding code into a separate file, and updating a couple comments. |
@VSadov Could I get a sign-off on this refactoring (splitting code into separate file)? |
LGTM |
Merged with a single approval since there is no new code introduced. |
result.WasCompilerGenerated = true; | ||
diagnostics.AddRange(bag); | ||
|
||
if (bag.HasAnyErrors()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this during the previous review. It might be inappropriate to use HasAnyErrors here. There are at least two reasons for that:
- It resolves lazy diagnostics, which could create circularity problems in certain contexts.
- Lazy errors shouldn't really fail the binding. An example would be an obsolete Deconstruct method. Yes, it is an error to use it, but that shouldn't prevent us from recording the actual binding information and continuing to the next level. I.e. we shouldn't complain that we couldn't find a suitable method.
Consider using HasAnyResolvedErrors instead and adding a test with an obsolete Deconstruct method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I took a note in #11299 to fix this.
LGTM |
No description provided.