Replies: 3 comments
-
how about var bucket = m_Buckets[index] ??= new List<string>(); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yep, that works! However, I'm curious if my example should work in the first place? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This scenario is considered too complex for the nullable flow state analyzer to handle at the moment. However it's possible that may change in the future. |
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.
-
I'm not 100% sure if this is an issue, but thought I'd post it anyway just to be sure...
If you've got an array of nullable reference types that you conditionally initialize via an if statement then the compiler doesn't do the flow analysis to detect that the item is no longer null. For example:
If this an issue with the flow analysis in the compiler, or is it a conscious decision to not analyze this sort of flow?
Beta Was this translation helpful? Give feedback.
All reactions