langtools/test/tools/javac/varargs/6806876/T6806876.java
author duke
Wed, 05 Jul 2017 18:59:39 +0200
changeset 18044 f1a01fb5f958
parent 3766 7e2df99e9223
permissions -rw-r--r--
Merge
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
}