mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
java highlighting tests moved to community
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
package x;
|
||||
public class A extends D{
|
||||
int k;
|
||||
static void staticF() {}
|
||||
}
|
||||
class C extends x.sub.B {
|
||||
int n=<error descr="'k' is not public in 'x.A'. Cannot be accessed from outside package">k</error>;
|
||||
|
||||
// can call despite inherited through package local from other package
|
||||
void f() { A.staticF(); }
|
||||
}
|
||||
|
||||
class D{
|
||||
public void foo(){}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// package local class in the middle
|
||||
|
||||
package x;
|
||||
class ComponentClass {
|
||||
public int size;
|
||||
}
|
||||
public class ContainerClass {
|
||||
public ComponentClass cc = new ComponentClass();
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package x.sub;
|
||||
|
||||
public class B extends x.A {
|
||||
}
|
||||
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package x.sub;
|
||||
|
||||
import x.ContainerClass;
|
||||
import x.A;
|
||||
|
||||
public class UsingMain {
|
||||
public static void main(String[] args) {
|
||||
final ContainerClass cont = new ContainerClass();
|
||||
System.out.println(cont.cc.<error descr="'x.ComponentClass' is not public in 'x'. Cannot be accessed from outside package">size</error>);////
|
||||
new A().foo();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user