-
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 must be a subtype of (...)->dynamic. #27727
Comments
@bwilkerson @jmesserly There's an analyzer and a DDC component to this, could you each take the respective parts? |
Yeah I can take a shot at this. Shouldn't be too hard. edit: and presumably we also want to allow "void" in inference. |
I'll split this up into analyzer and DDC pieces. |
thanks. I don't mind doing both BTW, it's probably pretty simple. |
Status: out for implementation. |
Huh. I might be missing something but this seems to be implemented already in Analyzer strong mode. |
DDC also appears to work already. I added an Analyzer and DDC test using the code example provided. Tentatively closing, let me know if there was something else we'd like to fix here. |
Strong mode needs to allow functions that return
void
when a function that returnsdynamic
is expected.Example use case:
Ideally, we would like to write
void
in the generic type (or infer it): #27504While this issue should stand on its own, it decreases the priority of #27504.
The text was updated successfully, but these errors were encountered: