Metharg1.java revision 2963:5032dfdc37be
1/*
2 * @test /nodynamiccopyright/
3 * @bug 4851039
4 * @summary explicit type arguments
5 * @author gafter
6 *
7 * @compile/fail/ref=Metharg1.out -XDrawDiagnostics Metharg1.java
8 */
9
10// Test type mismatch on type argument for method call
11
12class T<X> {
13
14    class U<Y> extends T<X> {
15        <B> U() {
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.<Object>super();
26        }
27    }
28
29    <A> T() {
30    }
31
32    <K> void f(K k) {
33        this.<Integer>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