J2K: preserving of visibility modifier for override members when access level was higher
This commit is contained in:
+1
-1
@@ -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
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user