test/tools/javac/lambda/TargetType16.java

Mon, 23 Jun 2014 13:14:32 -0700

author
rfield
date
Mon, 23 Jun 2014 13:14:32 -0700
changeset 2528
eb284abd64fe
parent 2395
9c577131ffa6
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8046060: Different results of floating point multiplication for lambda code block
Summary: propogate strictfp into lambda body
Reviewed-by: vromero, jlahoda

     1 /*
     2  * @test /nodynamiccopyright/
     3  * @bug 8003280 8034223
     4  * @summary Add lambda tests
     5  *  Check void-compatibility in strict vs. loose conversion contexts
     6  * @compile TargetType16.java
     7  */
     9 class TargetType16 {
    11     interface SAM1 {
    12         void m1();
    13     }
    15     interface SAM2<X> {
    16         X m2();
    17     }
    19     static void m(SAM1 s1) { }
    20     static <T> void m(SAM2<T> s2) { }
    22     public static void main(String[] args) {
    23         m(() -> { throw new AssertionError(); }); // prefer SAM2
    24     }
    25 }

mercurial