Correctly handle removal of 'protected' access flag on fields (IDEA-184854);

Fix InheritanceConstraint: when member access is changed to protected or package-private, more precise calculation of affected files
This commit is contained in:
Eugene Zhuravlev
2018-01-13 16:33:14 +01:00
parent 9d8e29c4f7
commit fd1c5c24f2
23 changed files with 174 additions and 42 deletions
@@ -3,10 +3,4 @@ out/production/SetProtected/A.class
End of files
Compiling files:
src/A.java
End of files
Cleaning output files:
out/production/SetProtected/B.class
End of files
Compiling files:
src/B.java
End of files
End of files
@@ -0,0 +1,12 @@
Cleaning output files:
out/production/SetProtectedFromPublic/qqq/A.class
End of files
Compiling files:
src/qqq/A.java
End of files
Cleaning output files:
out/production/SetProtectedFromPublic/ppp/D.class
End of files
Compiling files:
src/ppp/D.java
End of files
@@ -0,0 +1,8 @@
package ppp;
import qqq.*;
class D {
void f (A a) {
a.f();
}
}
@@ -0,0 +1,7 @@
package qqq;
public class A {
public void f (){
}
}
@@ -0,0 +1,7 @@
package qqq;
public class A {
protected void f() {
}
}
@@ -0,0 +1,7 @@
package qqq;
class B {
void f (A a) {
a.f();
}
}
@@ -0,0 +1,7 @@
package qqq;
class C extends A {
void g(){
f();
}
}