-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dotty fails to to infer type params for Java Stream API #801
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
Mostly related to mismatch between use site and definition site variance. How about inferring variance for Java interfaces? http://www.lirmm.fr/~ducour/Doc-objets/ECOOP2012/ECOOP/ecoop/509.pdf |
@adriaanm What's the status of this issue for scalac? |
I haven't made any progress on this. My original idea was to infer variance annotations for Java interfaces to feed that to type inference, so it can replace bounded wildcards by their upper/lower bounds depending on the variance position they occur in. |
@adriaanm Thanks or the update! I was hoping I could lift some code from you guys there. |
me too -- alas :) |
(I did do some work this week on our SAM expansion: scala/scala#4945 -- ideally, I'd like to generalize Function ASTs to have any function/sam type, and emit the corresponding invokedynamic+LambdaMetaFactory calls in the back-end. Right now, we expand SAM types like PartialFunction ones during type checking) |
That would be awesome! We could get rid of all the awful hacks in Scala.js to recover anonymous functions from classes (at least, once we drop support for 2.10 and 2.11 ...) |
see also https://groups.google.com/forum/#!msg/scala-language/Xy29pcRE04c/rwCvztHjsP8J for same issue for scalac
The text was updated successfully, but these errors were encountered: