Definite assignment should be informed by nullable checking. #9300
Unanswered
otac0n
asked this question in
Language Ideas
Replies: 1 comment
-
Similar: #2388 The compiler and language has no concept of tracking that kind of flow analysis through intermediary values. I could see that getting very complicated very quickly. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Definite assignment should be informed by nullable checking. For example:
or
These could feasibly be relaxed to treat symbolA and symbolB as definitely assigned.
As it stands, we get this slightly confusing set of statements from the language tools:
Compare this to the very similar:
Which is currently allowed.
Beta Was this translation helpful? Give feedback.
All reactions