langtools/test/tools/javac/generics/7034511/T7034511a.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=T7034511a.out -XDrawDiagnostics T7034511a.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 T7034511a {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    12
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    13
    interface A<T> {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    14
        void foo(T x);
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    15
    }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    16
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    17
    interface B<T> extends A<T[]> { }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    18
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    19
    static abstract class C implements B<Integer> {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    20
        <T extends B<?>> void test(T x, String[] ss) {
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    21
            x.foo(ss);
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    22
        }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    23
    }
da48f63f0b22 7034511: Loophole in typesafety
mcimadamore
parents:
diff changeset
    24
}