-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void is not supported as a generic method type argument #26275
Comments
It'd be nice to have some consistency around That said this seems like a Dart 2 issue, rather than something we can address in the short term. ( |
Shouln't it be |
In Dart, In this particular case, I'd consider parameterizing the class with the function type instead of with the parameter and return type: wrapZone/*<F extends UnaryFunction>*/(/*=F*/ callback) Persoanlly, I'd accept (The "void" type represents the empty type, a type with no value, hence the name. It doesn't make sense in places other than return types because you can never produce a value of that type - and for return types it only makes sense because |
CC @leafpetersen ... does it make sense to kick this to area-language instead of strong-mode. I don't think there's anything actionable we can do in the implementation |
I'm going to reclassify this as area-language, I don't think it's something we can address via strong mode |
Under consideration for the language. |
De-duping with newer but more active other issue: #27504. |
Reported by @jacob314 over at dart-archive/dev_compiler#496
Repro:
The text was updated successfully, but these errors were encountered: