Allow awaiting nullable tasks #4007
Answered
by
HaloFour
MrTA2
asked this question in
Language Ideas
-
Consider this code snipper:
First version generates a warning and an NRE at runtime, and the second one generates an error, because the method call expression, not having been executed, returns Proposed solution: await adds a check for Task? and ValueTask? - await if not null, do nothing if null. |
Beta Was this translation helpful? Give feedback.
Answered by
HaloFour
Oct 13, 2020
Replies: 1 comment 1 reply
-
Check out: #35 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
YairHalberstadt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check out: #35