J2K: preserving of visibility modifier for override members when access level was higher

This commit is contained in:
Valentin Kipyatkov
2015-09-15 12:26:33 +03:00
parent 6f12db9cde
commit cc4aa6ed21
9 changed files with 59 additions and 8 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
//class
enum Color { WHITE, BLACK, RED, YELLOW, BLUE;@Override String toString() { return "COLOR";}}
enum Color { WHITE, BLACK, RED, YELLOW, BLUE;@Override public String toString() { return "COLOR";}}
@@ -0,0 +1,10 @@
class Base {
protected void foo(){}
}
class Derived extends Base {
@Override
public void foo() {
super.foo();
}
}
@@ -0,0 +1,10 @@
internal open class Base {
protected open fun foo() {
}
}
internal class Derived : Base() {
public override fun foo() {
super.foo()
}
}
+2 -2
View File
@@ -18,14 +18,14 @@ public class Language implements Serializable {
class Base {
void test() {}
String toString() {
public String toString() {
return "BASE";
}
}
class Child extends Base {
void test() {}
String toString() {
public String toString() {
return "Child";
}
}