aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs151/pr124803/Test2.java
blob: 58a3645730d821ba7ef97312c235468c4a3dadbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Generic1<T extends Number> {
  public void foo(T p) { }
}


class Generic2<T extends Number, Y extends Number> extends Generic1<T> {
  public void foo2(Y p) {}
}

public class Test2<Y extends Number> extends Generic2<Y,Y>{
  public void foo2(Y p) { }
  public void foo(Y p) { }

  public static void main(String []argv) {
    Test2<Integer> t = new Test2<Integer>();
    t.foo(7);
    t.foo2(9);
  }
}