mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
provide access object for captured wildcards (IDEA-128542)
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
|
||||
abstract class A {
|
||||
protected void bar(){}
|
||||
}
|
||||
|
||||
abstract class Strange extends A {
|
||||
private void foo(){}
|
||||
|
||||
static void fooBar(Class<? extends Strange> clazz){
|
||||
getInstance(clazz).<error descr="'foo()' has private access in 'Strange'">foo</error>();
|
||||
getInstance(clazz).bar();
|
||||
}
|
||||
|
||||
public static <T> T getInstance(Class<T> clazz) {
|
||||
return (T) new StrangeImpl();
|
||||
}
|
||||
}
|
||||
|
||||
class StrangeImpl extends Strange{}
|
||||
Reference in New Issue
Block a user