Thu, 21 Feb 2013 15:27:05 +0000
8008444: Inherited generic functional descriptors are merged incorrectly
Summary: Missing call to Types.createMethodWithThrownTypes
Reviewed-by: jjg
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 7151802 |
aoqi@0 | 4 | * @summary compiler update caused sqe test failed |
aoqi@0 | 5 | * @compile/fail/ref=T7151802.out -Werror -Xlint:unchecked -XDrawDiagnostics T7151802.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | class T7151802 { |
aoqi@0 | 8 | static class Foo<X> { } |
aoqi@0 | 9 | |
aoqi@0 | 10 | static class SubFoo<X> extends Foo<X> { } |
aoqi@0 | 11 | |
aoqi@0 | 12 | //generic - bound - arg - non-slilent |
aoqi@0 | 13 | <Z extends Foo<String>> void get1(Z fz) { } |
aoqi@0 | 14 | void test1(Foo foo) { get1(foo); } |
aoqi@0 | 15 | |
aoqi@0 | 16 | //generic - bound - arg - silent |
aoqi@0 | 17 | <Z extends Foo<?>> void get2(Z fz) { } |
aoqi@0 | 18 | void test2(Foo foo) { get2(foo); } |
aoqi@0 | 19 | |
aoqi@0 | 20 | //generic - nobound - arg - non-slilent |
aoqi@0 | 21 | <Z> void get3(Foo<Z> fz) { } |
aoqi@0 | 22 | void test(Foo foo) { get3(foo); } |
aoqi@0 | 23 | |
aoqi@0 | 24 | //generic - nobound - arg - slilent |
aoqi@0 | 25 | <Z> void get4(Foo<?> fz) { } |
aoqi@0 | 26 | void test4(Foo foo) { get4(foo); } |
aoqi@0 | 27 | |
aoqi@0 | 28 | //generic - bound - ret - non-slilent |
aoqi@0 | 29 | <Z extends Foo<String>> Z get5() { return null; } |
aoqi@0 | 30 | void test5() { SubFoo sf = get5(); } |
aoqi@0 | 31 | |
aoqi@0 | 32 | //generic - bound - ret - slilent |
aoqi@0 | 33 | static <Z extends Foo<?>> Z get6() { return null; } |
aoqi@0 | 34 | void test6() { SubFoo sf = get6(); } |
aoqi@0 | 35 | |
aoqi@0 | 36 | //nogeneric - nobound - arg - non-slilent |
aoqi@0 | 37 | void get7(Foo<String> fz) { } |
aoqi@0 | 38 | void test7(Foo foo) { get7(foo); } |
aoqi@0 | 39 | |
aoqi@0 | 40 | //nogeneric - nobound - arg - slilent |
aoqi@0 | 41 | static void get8(Foo<?> fz) { } |
aoqi@0 | 42 | void test8(Foo foo) { get8(foo); } |
aoqi@0 | 43 | } |