Quick Info for "var" should show the flow state of the initializer #41245
Labels
Area-IDE
Concept-Continuous Improvement
IDE-IntelliSense
Completion, Signature Help, Quick Info
New Language Feature - Nullable Reference Types
Nullable Reference Types
Projects
Milestone
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)
The text was updated successfully, but these errors were encountered: