Skip to content
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

Merged
merged 4 commits into from
Mar 1, 2022

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Feb 28, 2022

Fixes #59804

@jcouv jcouv added this to the 17.2 milestone Feb 28, 2022
@jcouv jcouv self-assigned this Feb 28, 2022
@jcouv jcouv marked this pull request as ready for review February 28, 2022 20:38
@jcouv jcouv requested a review from a team as a code owner February 28, 2022 20:38
Copy link
Member

@333fred 333fred left a 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)

Comment on lines 190 to 191
if (subpattern.Member is BoundPropertySubpatternMember member
&& member.Symbol.Kind is SymbolKind.Property or SymbolKind.Field)
Copy link
Member

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

Copy link
Member Author

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

@333fred
Copy link
Member

333fred commented Mar 1, 2022

Test failures look legitimate.

@333fred
Copy link
Member

333fred commented Mar 1, 2022

Done review pass (commit 2)

@jcouv jcouv requested a review from 333fred March 1, 2022 18:52
Copy link
Member

@333fred 333fred left a 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.

@jcouv jcouv enabled auto-merge (squash) March 1, 2022 19:42
@jcouv jcouv merged commit b86265f into dotnet:main Mar 1, 2022
@ghost ghost modified the milestones: 17.2, Next Mar 1, 2022
@allisonchou allisonchou modified the milestones: Next, 17.2.P3 Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pattern matching error leads to MSB6006 "csc.exe" exited with code -2146232797
4 participants