summaryrefslogtreecommitdiffstats
path: root/tests/bugs152/pr137568/C.java
blob: 31fefae9a5e21f3c342e9aa7c8fd650e4e03e1fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//interface IGuard<P> {}
//
////interface Guard<P> extends IGuard<P> {}
//
//class GuardImpl<G> implements IGuard<G> {}
//
//public class C<T> {
//
//  private boolean m1(Class<? extends IGuard<T>> guardClz) throws Exception { return false;}
//  private boolean m2(Class<? extends IGuard<T>>[] guardClz) throws Exception { return false;}
//
//  public static void main(String []argv) throws Exception {
//    GuardImpl<String> g = new GuardImpl<String>();
//    C<String> newC = new C<String>();
//    newC.m1(g.getClass());
////    newC.m2(new Class[]{g.getClass()});
//  }
//
//}

interface IGuard<P> {}

interface Guard<P> extends IGuard<P> {}

class GuardImpl<X> implements Guard<X> {}

public class C<T> {
  
  private boolean checkGuards(Class<? extends IGuard<T>>[] guardClz) throws Exception { return false;}
  
  public static void main(String []argv) throws Exception {
    GuardImpl<String> g = new GuardImpl<String>();
    //new C<String>().checkGuards(g.getClass());//Guard.class);
    new C<String>().checkGuards(new Class[]{g.getClass()});//Guard.class);
  }
}