hg: lambda/lambda/langtools: Fix: Add extra checks when lambda/method ref is converted to intersection type
Boaz Nahum
boaznahum at gmail.com
Wed Nov 28 10:41:52 PST 2012
Can you explain why?
If I1 and I2 have same SAM why (I1 & I2) is not valid?
Can also explain why the order does matter?
Thx
(sorry foy English )
Boaz
On Nov 28, 2012 12:34 PM, <maurizio.cimadamore at oracle.com> wrote:
> Changeset: 7fa8e7c02baa
> Author: mcimadamore
> Date: 2012-11-28 10:31 +0000
> URL:
> http://hg.openjdk.java.net/lambda/lambda/langtools/rev/7fa8e7c02baa
>
> Fix: Add extra checks when lambda/method ref is converted to intersection
> type
>
> A lambda/methdod reference can be converted to an intersection type
> provided that:
>
> *) All types in the intersection are interface types
> *) The first type of the intersection is a functional interface
> *) The additional bounds of the intersection are marker interfaces
>
> ! src/share/classes/com/sun/tools/javac/code/Type.java
> ! src/share/classes/com/sun/tools/javac/code/Types.java
> ! src/share/classes/com/sun/tools/javac/comp/Attr.java
> ! src/share/classes/com/sun/tools/javac/resources/compiler.properties
> ! test/tools/javac/diags/examples.not-yet.txt
> + test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java
>
>
>
More information about the lambda-dev
mailing list