langtools/test/tools/javac/generics/7034511/T7034511b.java
author jjg
Fri, 03 May 2013 09:56:56 -0700
changeset 17544 80db48a54a9f
parent 9607 94b7adcaccad
child 18914 6edcda38fbdd
permissions -rw-r--r--
8012728: Normalize @ignore comments on langtools tests Reviewed-by: vromero, mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9301
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
     1
/*
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
17544
80db48a54a9f 8012728: Normalize @ignore comments on langtools tests
jjg
parents: 9607
diff changeset
     3
 * @ignore 7041019 Bogus type-variable substitution with array types with dependencies on accessibility check
9607
94b7adcaccad 7040883: Compilation error: "length in Array is defined in an inaccessible class or interface"
mcimadamore
parents: 9301
diff changeset
     4
 * @bug     7034511 7040883
9301
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
     5
 * @summary Loophole in typesafety
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
     6
 * @compile/fail/ref=T7034511b.out -XDrawDiagnostics T7034511b.java
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
     7
 */
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
     8
17544
80db48a54a9f 8012728: Normalize @ignore comments on langtools tests
jjg
parents: 9607
diff changeset
     9
// backing out 7034511, see 7040883
80db48a54a9f 8012728: Normalize @ignore comments on langtools tests
jjg
parents: 9607
diff changeset
    10
9301
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    11
class T7034511b {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    12
    static class MyList<E> {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    13
        E toArray(E[] e) { return null; }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    14
    }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    15
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    16
    void test(MyList<?> ml, Object o[]) {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    17
        ml.toArray(o);
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    18
    }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    19
}