RFR: JDK-8207320: Wrong type order for intersection lambdas with multiple abstract methods
forax at univ-mlv.fr
Wed Aug 15 15:20:25 UTC 2018
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.
> 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  at . 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,
>  [ https://bugs.openjdk.java.net/browse/JDK-8207320 |
> https://bugs.openjdk.java.net/browse/JDK-8207320 ]
>  [ 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...
More information about the compiler-dev