mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
IDEA-67385 (explicitly imported types should shadow inherited ones)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import p.Base.*;
|
||||
import p.BaseImpl;
|
||||
|
||||
class Test extends BaseImpl {
|
||||
void m() {
|
||||
Inner inner = new Inner() { }; // imported public Base.Inner should shadow inherited package-private BaseImpl.Inner
|
||||
BaseImpl.<error descr="'p.BaseImpl.Inner' is not public in 'p.BaseImpl'. Cannot be accessed from outside package">Inner</error> i2 = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package p;
|
||||
|
||||
public interface Base {
|
||||
interface Inner { }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package p;
|
||||
|
||||
public class BaseImpl implements Base {
|
||||
static class Inner implements Inner { }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import p.Base.Inner;
|
||||
import p.BaseImpl;
|
||||
|
||||
class Test extends BaseImpl {
|
||||
void m() {
|
||||
Inner inner = new Inner() { }; // imported public Base.Inner should shadow inherited package-private BaseImpl.Inner
|
||||
BaseImpl.<error descr="'p.BaseImpl.Inner' is not public in 'p.BaseImpl'. Cannot be accessed from outside package">Inner</error> i2 = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package p;
|
||||
|
||||
public interface Base {
|
||||
interface Inner { }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package p;
|
||||
|
||||
public class BaseImpl implements Base {
|
||||
static class Inner implements BaseImpl.Inner { }
|
||||
}
|
||||
Reference in New Issue
Block a user