author | peterz |
Fri, 28 May 2010 13:32:40 +0400 | |
changeset 5594 | 3db39773da2e |
parent 3766 | 7e2df99e9223 |
permissions | -rw-r--r-- |
3554
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
1 |
/* |
3766 | 2 |
* @test /nodynamiccopyright/ |
3554
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 6806876 |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
4 |
* @author mcimadamore |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
5 |
* @summary ClassCastException occurs in assignment expressions without any heap pollutions |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
6 |
* @compile/fail/ref=T6806876.out -Xlint:unchecked -Werror -XDrawDiagnostics T6806876.java |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
7 |
*/ |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
8 |
|
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
9 |
class T6806876 { |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
10 |
void test(Integer i, Long l) { |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
11 |
Comparable<?>[] res = m(i, l); |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
12 |
} |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
13 |
|
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
14 |
<T> T[] m(T...a) { |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
15 |
return null; |
a0a7f7f2a6e5
6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff
changeset
|
16 |
} |
3766 | 17 |
} |