Incorrect nullability analysis for extension method with inference #78022
Labels
Area-Compilers
Feature - Extension Everything
The extension everything feature
Feature - Nullable Reference Types
Nullable Reference Types
Milestone
In the example below, the only argument for the extension method is
oNull
which may be null.So
oNull.Id
has signatureobject? ()
.The conversion to an explicit type works properly (warn on nullability issue with return type).
But in the function type scenario, it looks like
var x
isn't analyzed with that inferred type.Also, the semantic model (
GetSymbolInfo
) has incorrect nullability for both member accesses.This issue also impacts the semantic model for deconstructions.
This issue also impacts new extension members.
The text was updated successfully, but these errors were encountered: