Superarg2.java revision 2963:5032dfdc37be
1/*
2 * @test /nodynamiccopyright/
3 * @bug 4851039
4 * @summary explicit type arguments
5 * @author gafter
6 *
7 * @compile/fail/ref=Superarg2.out -XDrawDiagnostics Superarg2.java
8 */
9
10// Test type mismatch on type argument for inner super constructor
11
12class T<X> {
13
14    class U<Y> extends T<X> {
15        <B> U(B b) {
16            <Object>super();
17        }
18        U(int i) {
19            <Object>this("");
20        }
21    }
22
23    class V<Z> extends U<Z> {
24        <C> V(T<X> t) {
25            t.<Integer>super("");
26        }
27    }
28
29    <A> T() {
30    }
31
32    <K> void f() {
33        this.<Object>f();
34    }
35
36    public static void main(String[] args) {
37        T<Integer> x = new <Object>T<Integer>();
38        T<Integer>.U<Float> y = x.new <Object>U<Float>("");
39        x.<Object>f();
40    }
41}
42