langtools/test/tools/javac/warnings/6747671/T6747671.java
author jjg
Thu, 27 Aug 2009 11:08:27 -0700
changeset 3766 7e2df99e9223
parent 1358 a51c5f89f8af
child 6351 84c44db80d06
permissions -rw-r--r--
6875336: some tests should use /nodynamiccopyright/ Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1358
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     1
/**
3766
7e2df99e9223 6875336: some tests should use /nodynamiccopyright/
jjg
parents: 1358
diff changeset
     2
 * @test /nodynamiccopyright/
1358
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     3
 * @bug 6747671
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     4
 * @summary -Xlint:rawtypes
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     5
 * @compile/ref=T6747671.out -XDrawDiagnostics -Xlint:rawtypes T6747671.java
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     6
 */
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     7
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     8
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
     9
class T6747671<E> {
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    10
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    11
    static class B<X> {}
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    12
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    13
    class A<X> {
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    14
        class X {}
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    15
        class Z<Y> {}
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    16
    }
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    17
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    18
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    19
    A.X x1;//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    20
    A.Z z1;//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    21
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    22
    T6747671.B<Integer> b1;//ok
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    23
    T6747671.B b2;//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    24
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    25
    A<String>.X x2;//ok
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    26
    A<String>.Z<Integer> z2;//ok
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    27
    A<B>.Z<A<B>> z3;//raw warning (2)
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    28
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    29
    void test(Object arg1, B arg2) {//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    30
        boolean b = arg1 instanceof A;//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    31
        Object a = (A)arg1;//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    32
        A a2 = new A() {};//raw warning (2)
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    33
        a2.new Z() {};//raw warning
a51c5f89f8af 6747671: -Xlint:rawtypes
mcimadamore
parents:
diff changeset
    34
    }
3766
7e2df99e9223 6875336: some tests should use /nodynamiccopyright/
jjg
parents: 1358
diff changeset
    35
}