async enumerable should not error if it throws without yield statement #3145
-
I'm stubbing out an application making all methods throw a
To get around it, I'm throwing in a useless
The compiler allows this fine for synchronous generators (which I understand is treated as a regular method that returns an enumerable).
It does warn for regular asynchronous methods with CS1998.
I think it should be allowed and not error for the async generator case. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can omit the |
Beta Was this translation helpful? Give feedback.
You can omit the
async
keyword until you're ready to implement those methods.