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