Implement conditional expression changes in definite assignment#51498
Conversation
|
@dotnet/roslyn-compiler please review. |
I think it would be worth adding some variations of these tests (where the condition is DAT/F) and the branch is a constant value. ie, something like Refers to: src/Compilers/CSharp/Test/Semantic/FlowAnalysis/FlowTests.cs:1752 in f126ebe. [](commit_id = f126ebe, deletion_comment = False) |
Also, is In reply to: 789277456 [](ancestors = 789277456) Refers to: src/Compilers/CSharp/Test/Semantic/FlowAnalysis/FlowTests.cs:1752 in f126ebe. [](commit_id = f126ebe, deletion_comment = False) |
|
Done review pass (commit 5) |
Does this refer to unary not or to nullable suppression? |
Unary not. |
|
I have added a related test case in |
Note that ed38577 simply deletes and regenerates the baseline in order to make comparison easier in the subsequent commit.
I decided to do this bit first, as the precise method of doing it had been in my head. There are corresponding nullable analysis changes I'd like to make, but nullable does more complex things with conditional expressions. Therefore I'd like to do those changes in a subsequent PR.
/cc @jcouv
Implementation of part of dotnet/csharplang#4472. The relevant spec sections implemented in this PR are:
Relates to test plan #51463