Replies: 2 comments 11 replies
-
C# has no concept of what |
Beta Was this translation helpful? Give feedback.
5 replies
-
See #4187 |
Beta Was this translation helpful? Give feedback.
6 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.
-
I have some code where I'm assigning a reference-type variable inside an awaited lambda, like this:
But the last line gives me "Use of unassigned local variable 'testVar'". It seems that the C# compiler is still unable to determine that a variable is guaranteed to be set in an awaited lambda. Is there any technical reason for this? I know I can use
= null!
to override this warning but it seems to me that the compiler should be able to figure it out.Beta Was this translation helpful? Give feedback.
All reactions