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