Skip to content

Extensions: nullability follow-ups #78828

@jcouv

Description

@jcouv

This issue is referenced in source.
It tracks scenarios that were identified as needing more nullability work.

There were two PRs on nullability already, focused on direct uses of extensions:

Aside from things tracked in source, the analysis of indirect usages of extension members is not done yet:

  • foreach
  • object/collection initializers
  • with expression
  • collection expressions (binding follow-ups are addressed here)
  • patterns (is { ExtensionProperty: var x })
  • await
  • fixed
  • using
  • potentially extension operators (those are in a feature branch, should discuss with Aleksey)
  • also Aleksey noticed that we're not going into the right branch in NullableWalker.GenerateConversion (first branch is for this parameter of classic extension methods). Not sure how to observe this (should this method be simplified?)

It is possible that some of those already fail in the baseline (ie. we didn't implement nullability analysis with instance methods or classic extension methods). In such case, we can punt handling of new extensions.

Operators

  • Inference from lambdas doesn't work (Binary_127_NullableAnalysis_WithLambda). There is also a relevant comment in NullableWalker.ReInferBinaryOperator helper.

Relates to test plan #76130

Sub-issues

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions