dotnet/roslyn
View on GitHubNullability no longer honors null check when it is also an assignment
Open
#44,461 opened on May 21, 2020
Area-CompilersBugFeature - Nullable Reference Typeshelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
Version Used: master (19 May 2020)
Steps to Reproduce:
- Do assignment of the null check expression inside an if statement.
Expected Behavior: Object was already checked for null, nullability should no longer warn "Possible null reference".
Actual Behavior: Nullability still warn "Possible null reference" regardless of the previous null check.
cc @jaredpar @cston @jcouv