#nullable enable should detect nested initialization of fields #35592
Labels
Area-Compilers
Feature - Nullable Reference Types
Nullable Reference Types
Resolution-Duplicate
The described behavior is tracked in another issue
Version Used:
C# 8.0, .Net Core SDK 2.1.700
Steps to Reproduce:
With #nullable enable, "Non-nullable field is uninitialized" warning will show up if some field is not initialized in constructor. But sometimes we want to initialize some thing in a function so that it can be well structured, or we need to call an abstract function on children class. So this is bug is filed as a suggestion to consider detect nested initialization for #nullable enable. Thank you so much!
Code example:
Expected Behavior:
No warning.
Actual Behavior:
"Non-nullable field is uninitialized" shows up around the constructor.
The text was updated successfully, but these errors were encountered: