NRT - Deeper analysis inside constructor for indirect intialization scenarios #2869
Unanswered
andre-ss6
asked this question in
Language Ideas
Replies: 2 comments
-
Already pointed this out on gitter, but related to #2328. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is coming up frequently enough to be annoying across every codebase (open-source and proprietary) that I've used NRTs with so far. I've been doing Flow control could in theory prove that the constructor was calling a method or property accessor which unconditionally initializes that field. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
InitializeComponent
scenario:Also, happened to me on the first project I'm updating with NRTs:
The compiler should follow on the method calls inside a constructor to a reasonable depth in order to determine nullability.
Beta Was this translation helpful? Give feedback.
All reactions