Support sealed class inheritors in the same file
#KT-11573 Fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
sealed class Base
|
||||
|
||||
class Derived: Base() {
|
||||
class Derived2: <!INVISIBLE_MEMBER, SEALED_SUPERTYPE!>Base<!>()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
class Local: <!INVISIBLE_MEMBER, SEALED_SUPERTYPE!>Base<!>()
|
||||
}
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public sealed class Base {
|
||||
private constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -12,4 +14,11 @@ public final class Derived : Base {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Derived2 : Base {
|
||||
public constructor Derived2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
sealed class Base {
|
||||
|
||||
}
|
||||
|
||||
class Derived: <!INVISIBLE_MEMBER, SEALED_SUPERTYPE!>Base<!>() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
sealed class Base
|
||||
}
|
||||
|
||||
class Derived : <!INVISIBLE_MEMBER, SEALED_SUPERTYPE!>A.Base<!>()
|
||||
|
||||
fun test() {
|
||||
class DerivedLocal : <!INVISIBLE_MEMBER, SEALED_SUPERTYPE!>A.Base<!>()
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed class Base {
|
||||
private constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class Derived : A.Base {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user