-
Notifications
You must be signed in to change notification settings - Fork 14
Support retroactive variance declarations for Java function types #184
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
Comments
@adriaanm I fear that the "variance cast" solution in SI-8079 won't really be that useful in practice, it relies on people using the wrapper type aliases in the API you're working with. |
I've implemented this as a proof of concept compiler plugin for now. |
Cool!! |
FWIW, Dotty is able to type |
Closing this as it turns out we don't need it to make things work as desired, constraint solving just needed a bug fix. |
Should we just go ahead and set the variances for
java.util.Function
? We could follow up with an extension point for third party classes in a later release?Precedent: we change
Serializable
andComparable
to look like universal traits:The text was updated successfully, but these errors were encountered: