test/tools/javac/lambda/NoWarnOnImplicitParams.java

Wed, 14 May 2014 15:41:28 -0600

author
dlsmith
date
Wed, 14 May 2014 15:41:28 -0600
changeset 2395
9c577131ffa6
parent 0
959103a6100f
permissions
-rw-r--r--

8034223: Most-specific should not have any special treatment for boxed vs. unboxed types
Summary: Rewrite most-specific logic to conform to JLS 8 15.12.2.5
Reviewed-by: vromero

     1 /*
     2  * @test /nodynamiccopyright/
     3  * @bug 8013222
     4  * @summary Javac issues spurious raw type warnings when lambda has implicit parameter types
     5  * @compile/fail/ref=NoWarnOnImplicitParams.out -Xlint:rawtypes -Werror -XDrawDiagnostics NoWarnOnImplicitParams.java
     6  */
     7 import java.util.List;
     9 class NoWarnOnImplicitParams {
    11     public void testRawMerge(List<String> ls) {
    12         R12 r12_1 = l->"Foo";
    13         R12 r12_2 = (List l)->"Foo";
    14     }
    16     interface R1 {
    17         Object m(List<String> ls);
    18     }
    20     @SuppressWarnings("rawtypes")
    21     interface R2 {
    22         String m(List l);
    23     }
    25     interface R12 extends R1, R2 {}
    26 }

mercurial