RFR: JDK-8207320: Wrong type order for intersection lambdas with multiple abstract methods
Remi Forax
forax at univ-mlv.fr
Wed Aug 15 15:20:25 UTC 2018
Hi Vicente,
i do not think that changing the way an intersection type is erased is the good way to solve that issue, it's a risky move as a lot of codes rely on javac erasing an intersection type to its first component.
I think it's better to report an error when the lambda target type doesn't include the method of the method reference with a message indicating how the intersection type should be written.
regards,
Rémi
> De: "Vicente Romero" <vicente.romero at oracle.com>
> À: "compiler-dev" <compiler-dev at openjdk.java.net>
> Envoyé: Mercredi 15 Août 2018 17:04:00
> Objet: RFR: JDK-8207320: Wrong type order for intersection lambdas with multiple
> abstract methods
> Please review the fix for [1] at [2]. The fix is modifying the way intersection
> types are erased. Javac erases an intersection type to its first component, but
> it is not always the right choice. This patch fixes that issue. As an
> additional information please check Dan's comments in the bug entry,
> Thanks,
> Vicente
> [1] [ https://bugs.openjdk.java.net/browse/JDK-8207320 |
> https://bugs.openjdk.java.net/browse/JDK-8207320 ]
> [2] [ http://cr.openjdk.java.net/%7Evromero/8207320/webrev.00/jdk.dev.patch |
> http://cr.openjdk.java.net/~vromero/8207320/webrev.00/jdk.dev.patch ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180815/81c37c3c/attachment.html>
More information about the compiler-dev
mailing list