overriddenDescriptors is empty for java static property and function declarations
Fake overrides are still created for java static with non-empty overriddenDescriptors Add tests for inheriting visibility for java static members Add test: check that java static declarations that shadow deprecated declarations should not be deprecated Add test for corner case where "overriding" java static constant led to incorrect type in inheritor Fix test data for existing tests
This commit is contained in:
+2
-2
@@ -5,11 +5,11 @@ public/*package*/ open class Child : test.Parent {
|
||||
|
||||
// Static members
|
||||
public final override /*1*/ /*fake_override*/ var a: kotlin.Int
|
||||
public final override /*1*/ var b: kotlin.String
|
||||
public final var b: kotlin.String!
|
||||
public final var c: kotlin.Int
|
||||
public open fun bar(): kotlin.Unit
|
||||
public open fun bar(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ fun baz(): kotlin.Unit
|
||||
public open fun baz(): kotlin.Unit
|
||||
public open fun baz(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
public open fun foo(/*0*/ p0: kotlin.Int): kotlin.Unit
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
class Parent {
|
||||
private static int private_ = 1;
|
||||
static int packagePrivate_ = 2;
|
||||
protected static int protected_ = 3;
|
||||
public static int public_ = 4;
|
||||
}
|
||||
|
||||
class Child extends Parent {
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package test
|
||||
|
||||
public/*package*/ open class Child : test.Parent {
|
||||
public/*package*/ constructor Child()
|
||||
|
||||
// Static members
|
||||
public/*package*/ final override /*1*/ /*fake_override*/ var packagePrivate_: kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var private_: kotlin.Int
|
||||
protected/*protected static*/ final override /*1*/ /*fake_override*/ var protected_: kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ var public_: kotlin.Int
|
||||
}
|
||||
|
||||
public/*package*/ open class Parent {
|
||||
public/*package*/ constructor Parent()
|
||||
|
||||
// Static members
|
||||
public/*package*/ final var packagePrivate_: kotlin.Int
|
||||
private final var private_: kotlin.Int
|
||||
protected/*protected static*/ final var protected_: kotlin.Int
|
||||
public final var public_: kotlin.Int
|
||||
}
|
||||
+2
-2
@@ -5,9 +5,9 @@ public/*package*/ open class Child : test.Parent1, test.Parent2 {
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public final override /*1*/ var b: kotlin.String
|
||||
public final var b: kotlin.String!
|
||||
public final var c: kotlin.Int
|
||||
public final override /*1*/ var d: kotlin.String
|
||||
public final var d: kotlin.String!
|
||||
public const final override /*1*/ /*fake_override*/ val e: kotlin.Int
|
||||
public open fun bar(): kotlin.Unit
|
||||
public open fun baz(): kotlin.Unit
|
||||
|
||||
+2
-2
@@ -25,9 +25,9 @@ public/*package*/ final enum class StaticMembersInEnum : kotlin.Enum<test.Static
|
||||
|
||||
// Static members
|
||||
public const final override /*1*/ /*fake_override*/ val a: kotlin.Int
|
||||
public final override /*1*/ var b: kotlin.Int
|
||||
public final var b: kotlin.Int
|
||||
public final var c: kotlin.Int
|
||||
public final override /*1*/ var d: kotlin.Int
|
||||
public final var d: kotlin.Int
|
||||
public const final override /*1*/ /*fake_override*/ val e: kotlin.Int
|
||||
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "Use 'values()' function instead", replaceWith = kotlin.ReplaceWith(expression = "this.values()", imports = {})) public final /*synthesized*/ val values: kotlin.Array<test.StaticMembersInEnum>
|
||||
public open fun foo(): kotlin.Unit
|
||||
|
||||
Reference in New Issue
Block a user