author | peterz |
Fri, 28 May 2010 13:32:40 +0400 | |
changeset 5594 | 3db39773da2e |
parent 3766 | 7e2df99e9223 |
permissions | -rw-r--r-- |
1867
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
1 |
/* |
3766 | 2 |
* @test /nodynamiccopyright/ |
1867
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
3 |
* @author Maurizio Cimadamore |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
4 |
* @bug 6795580 |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
5 |
* @summary parser confused by square brackets in qualified generic cast |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
6 |
* @compile/fail/ref=T6795580.out -XDrawDiagnostics T6795580.java |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
7 |
*/ |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
8 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
9 |
class T6795580 { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
10 |
class Outer<S> { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
11 |
class Inner<T> {} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
12 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
13 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
14 |
void cast1(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
15 |
Object o = (Outer<Integer>.Inner<Long>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
16 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
17 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
18 |
void cast2(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
19 |
Object o = (Outer<? extends Number>.Inner<Long>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
20 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
21 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
22 |
void cast3(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
23 |
Object o = (Outer<Integer>.Inner<? extends Number>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
24 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
25 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
26 |
void cast4(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
27 |
Object o = (Outer<? extends Number>.Inner<? extends Number>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
28 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
29 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
30 |
void cast5(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
31 |
Object o = (Outer<? super Number>.Inner<Long>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
32 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
33 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
34 |
void cast6(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
35 |
Object o = (Outer<Integer>.Inner<? super Number>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
36 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
37 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
38 |
void cast7(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
39 |
Object o = (Outer<? super Number>.Inner<? super Number>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
40 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
41 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
42 |
void cast8(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
43 |
Object o = (Outer<? extends String>.Inner<Long>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
44 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
45 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
46 |
void cast9(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
47 |
Object o = (Outer<Integer>.Inner<? extends String>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
48 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
49 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
50 |
void cast10(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
51 |
Object o = (Outer<? super String>.Inner<Long>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
52 |
} |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
53 |
|
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
54 |
void cast11(Outer<Integer>.Inner<Long>[] p) { |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
55 |
Object o = (Outer<Integer>.Inner<? super String>[])p; |
0a3af3ae0d8e
6795580: parser confused by square brackets in qualified generic cast
mcimadamore
parents:
diff
changeset
|
56 |
} |
3766 | 57 |
} |