Skip to content

Quick Info for "var" should show the flow state of the initializer #41245

@jasonmalinowski

Description

@jasonmalinowski

With "var" being changed to always infer a nullable type for assignment purposes, it can now be surprising that the right hand side of an initializer and the 'var' no longer match in type. If you mouse over the variable name, you see both: the type and the statement that the flow state is or isn't null. If you mouse directly over var...you don't get that. We should update var accordingly with text similar to "The initial value is not null" and "The initial value may be null" similar to what we show when you mouse over the variable name.

(The suggested text is stolen from @sharwell's comment in #41008)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions