langtools/test/tools/javac/varargs/6806876/T6806876.java
author peterz
Fri, 28 May 2010 13:32:40 +0400
changeset 5594 3db39773da2e
parent 3766 7e2df99e9223
permissions -rw-r--r--
6954231: SynthTextPaneUI.installUI() doesn't set component to opaque even if prop was not set by client progr Reviewed-by: alexp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3554
a0a7f7f2a6e5 6806876: ClassCastException occurs in assignment expressions without any heap pollutions
mcimadamore
parents:
diff changeset
     1
/*
3766
7e2df99e9223 6875336: some tests should use /nodynamiccopyright/
jjg
parents: 3554
diff changeset
     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
7e2df99e9223 6875336: some tests should use /nodynamiccopyright/
jjg
parents: 3554
diff changeset
    17
}