temp solution (IDEA-118527)

This commit is contained in:
Anna Kozlova
2014-01-28 17:55:59 +04:00
parent 486cac873c
commit 32094bf637
3 changed files with 109 additions and 8 deletions
@@ -0,0 +1,48 @@
interface Listener<A0, B0> {}
class Adapter<A, B> implements Listener<A, B> {}
class Super<O, B> {
public <C extends Adapter<O, B>> C apply(C configurer) throws Exception {
return null;
}
public <C extends Listener<O, B>> C apply(C configurer) throws Exception {
return null;
}
}
class AdapterImpl extends Adapter<String, String>{}
class Child<O, B> extends Super<O, B> {}
class D {
void foo(Child<String, String> ch, AdapterImpl a) throws Exception {
ch.apply(a);
}
}
class Test {
interface Listener<A0, B0> {}
class Adapter<A, B> implements Listener<A, B> {}
class Super<O, B> {
public <C extends Adapter<O, B> & Runnable> C apply(C configurer) throws Exception {
return null;
}
public <C extends Listener<O, B> & Runnable> C apply(C configurer) throws Exception {
return null;
}
}
abstract class AdapterImpl extends Adapter<String, String> implements Runnable{}
class Child<O, B> extends Super<O, B> {}
class D {
void foo(Child<String, String> ch, AdapterImpl a) throws Exception {
ch.apply( a);
}
}
}