Improved nullable conditional operator analysis#52783
Merged
RikkiGibson merged 5 commits intodotnet:features/improved-definite-assignmentfrom May 10, 2021
Merged
Improved nullable conditional operator analysis#52783RikkiGibson merged 5 commits intodotnet:features/improved-definite-assignmentfrom
RikkiGibson merged 5 commits intodotnet:features/improved-definite-assignmentfrom
Conversation
7e07ab1 to
704af28
Compare
Member
Author
333fred
reviewed
May 5, 2021
src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs
Outdated
Show resolved
Hide resolved
333fred
reviewed
May 5, 2021
src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs
Show resolved
Hide resolved
333fred
reviewed
May 5, 2021
src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs
Outdated
Show resolved
Hide resolved
Member
333fred
reviewed
May 6, 2021
|
|
||
| { | ||
| if (!(b ? " + @false + @" : x == null)) | ||
| y = x; // 3 |
Member
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
Looking into this I realize I'm not quite satisfied with the coding pattern used in this test, so I rewrote the test while ensuring that the scenarios you've called out are covered.
Member
|
Done review pass (commit 2). In reply to: 833686766 |
jcouv
reviewed
May 7, 2021
jcouv
reviewed
May 7, 2021
Member
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 3)
jcouv
reviewed
May 7, 2021
| return state; | ||
| } | ||
|
|
||
| private void SetConditionalState(in PossiblyConditionalState conditionalState) |
Member
Member
Author
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Resolves #36096
Test plan: #51463
Implements changes to conditional operator
?:analysis. It may be helpful to review the corresponding definite assignment PR #51498.Specifically, this PR allows conditional state to propagate out of the arms of a conditional operator in the nullable walker, enabling scenarios like the following: