-
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
Don't get nullable slot if property sub-pattern has error #59813
Conversation
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.
Done review pass (commit 1)
src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker_Patterns.cs
Outdated
Show resolved
Hide resolved
if (subpattern.Member is BoundPropertySubpatternMember member | ||
&& member.Symbol.Kind is SymbolKind.Property or SymbolKind.Field) |
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.
subpattern.Member is BoundPropertySubpatternMember { Symbol.Kind: SymbolKind.Property or SymbolKind.Field } member
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.
That would break for extended property scenario. Will add test to illustrate
Test failures look legitimate. |
Done review pass (commit 2) |
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.
LGTM (commit 4), assuming tests are passing.
Fixes #59804