[FE] Make constructors of sealed classes protected instead of internal
This commit is contained in:
committed by
TeamCityServer
parent
e795c2c407
commit
f3a8fcaea6
+6
@@ -24397,6 +24397,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/sealed/kt44316.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt44861.kt")
|
||||
public void testKt44861() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/sealed/kt44861.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Local.kt")
|
||||
public void testLocal() throws Exception {
|
||||
|
||||
Vendored
-3
@@ -8,9 +8,6 @@ This mode is not recommended for production use,
|
||||
as no stability/compatibility guarantees are given on
|
||||
compiler or generated code. Use it at your own risk!
|
||||
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/main.kt:5:11: error: cannot access '<init>': it is internal in 'Base'
|
||||
class B : Base(), IBase
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/main.kt:5:11: error: inheritance of sealed classes or interfaces from different module is prohibited
|
||||
class B : Base(), IBase
|
||||
^
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed data class My {
|
||||
internal constructor My(/*0*/ x: kotlin.Int)
|
||||
protected constructor My(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public final operator /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ...): My
|
||||
|
||||
Vendored
+4
-4
@@ -77,27 +77,27 @@ public object KT32183 {
|
||||
}
|
||||
|
||||
public sealed class ProjectJob {
|
||||
internal constructor ProjectJob()
|
||||
protected constructor ProjectJob()
|
||||
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 Process</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>, /*1*/ R : KT32183.ProjectJob.ProcessResources<R>> : KT32183.ProjectJob {
|
||||
internal constructor Process</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>, /*1*/ R : KT32183.ProjectJob.ProcessResources<R>>()
|
||||
protected constructor Process</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>, /*1*/ R : KT32183.ProjectJob.ProcessResources<R>>()
|
||||
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 ProcessExecutable</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>> {
|
||||
internal constructor ProcessExecutable</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>>()
|
||||
protected constructor ProcessExecutable</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>>()
|
||||
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 ProcessResources</*0*/ R : KT32183.ProjectJob.ProcessResources<R>> {
|
||||
internal constructor ProcessResources</*0*/ R : KT32183.ProjectJob.ProcessResources<R>>()
|
||||
protected constructor ProcessResources</*0*/ R : KT32183.ProjectJob.ProcessResources<R>>()
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@ public fun </*0*/ A, /*1*/ B> Either<A, B>.recover(/*0*/ f: (A) -> B): Either<A,
|
||||
public fun </*0*/ A> A.right(): Either<kotlin.Nothing, A>
|
||||
|
||||
public sealed class Either</*0*/ out A, /*1*/ out B> {
|
||||
internal constructor Either</*0*/ out A, /*1*/ out B>()
|
||||
protected constructor Either</*0*/ out A, /*1*/ out B>()
|
||||
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
-1
@@ -174,7 +174,7 @@ public abstract inline class D2 {
|
||||
}
|
||||
|
||||
public sealed inline class D3 {
|
||||
internal constructor D3(/*0*/ x: kotlin.Int)
|
||||
protected constructor D3(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -21,13 +21,13 @@ package p {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed class Sealed1 {
|
||||
internal constructor Sealed1()
|
||||
protected constructor Sealed1()
|
||||
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 Sealed2 {
|
||||
internal constructor Sealed2()
|
||||
protected constructor Sealed2()
|
||||
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
|
||||
|
||||
@@ -155,7 +155,7 @@ package illegal_modifiers {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed inner class Inner {
|
||||
internal constructor Inner()
|
||||
protected constructor Inner()
|
||||
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
|
||||
|
||||
@@ -30,7 +30,7 @@ package test {
|
||||
}
|
||||
|
||||
public sealed class S {
|
||||
internal constructor S()
|
||||
protected constructor S()
|
||||
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
-1
@@ -70,7 +70,7 @@ public expect interface BaseE {
|
||||
}
|
||||
|
||||
public sealed class BaseEImpl : BaseE {
|
||||
internal constructor BaseEImpl()
|
||||
protected constructor BaseEImpl()
|
||||
public final fun bar(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract expect override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed expect class Presence {
|
||||
package
|
||||
|
||||
public sealed class P {
|
||||
internal constructor P()
|
||||
protected constructor P()
|
||||
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
-1
@@ -37,7 +37,7 @@ public actual object Online : P {
|
||||
}
|
||||
|
||||
public sealed class P {
|
||||
internal constructor P()
|
||||
protected constructor P()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -5,7 +5,7 @@ public fun test2(/*0*/ x: Stmt): kotlin.String
|
||||
public fun test3(/*0*/ x: Expr): kotlin.String
|
||||
|
||||
public sealed class Expr : Stmt {
|
||||
internal constructor Expr()
|
||||
protected constructor Expr()
|
||||
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
|
||||
@@ -26,7 +26,7 @@ public final class ForStmt : Stmt {
|
||||
}
|
||||
|
||||
public sealed class Stmt {
|
||||
internal constructor Stmt()
|
||||
protected constructor Stmt()
|
||||
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 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected constructor Base()
|
||||
public final fun bar(): kotlin.Int
|
||||
public final fun baz(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -11,7 +11,7 @@ public sealed class Base {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed class A : Base {
|
||||
internal constructor A()
|
||||
protected constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun bar(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun baz(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -32,7 +32,7 @@ public sealed class Base {
|
||||
}
|
||||
|
||||
public sealed class A2 : Base.A {
|
||||
internal constructor A2()
|
||||
protected constructor A2()
|
||||
public final override /*1*/ /*fake_override*/ fun bar(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun baz(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -44,7 +44,7 @@ public sealed class Base {
|
||||
}
|
||||
|
||||
public sealed class B : Base {
|
||||
internal constructor B()
|
||||
protected constructor B()
|
||||
public final override /*1*/ /*fake_override*/ fun bar(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun baz(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -54,7 +54,7 @@ public sealed class Base {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed class B1 : Base.B {
|
||||
internal constructor B1()
|
||||
protected constructor B1()
|
||||
public final override /*1*/ /*fake_override*/ fun bar(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun baz(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -5,14 +5,14 @@ public fun test2(/*0*/ a: A): kotlin.Any
|
||||
public fun test3(/*0*/ a: A): kotlin.Any
|
||||
|
||||
public sealed class A {
|
||||
internal constructor A()
|
||||
protected 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 B : A {
|
||||
internal constructor B()
|
||||
protected constructor B()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
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
|
||||
|
||||
@@ -6,7 +6,7 @@ public fun fooWithElse(/*0*/ s: Sealed): kotlin.Int
|
||||
public fun fooWithoutElse(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed, /*1*/ nf: Sealed.NonFirst): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
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
|
||||
@@ -16,7 +16,7 @@ public sealed class Sealed {
|
||||
}
|
||||
|
||||
public sealed class NonFirst {
|
||||
internal constructor NonFirst()
|
||||
protected constructor NonFirst()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed?): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -14,7 +14,7 @@ public final class B : Base {
|
||||
}
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
public final val p: Sealed
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -20,7 +20,7 @@ package foo {
|
||||
}
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -5,13 +5,13 @@ public fun foo(/*0*/ b: Base): kotlin.Int
|
||||
public fun gav(/*0*/ b: Base?): kotlin.Int
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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 sealed class A : Base {
|
||||
internal constructor A()
|
||||
protected 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
|
||||
@@ -32,7 +32,7 @@ public sealed class Base {
|
||||
}
|
||||
|
||||
public sealed class B : Base {
|
||||
internal constructor B()
|
||||
protected constructor B()
|
||||
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
-1
@@ -38,7 +38,7 @@ package foo {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): Base
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -9,7 +9,7 @@ public final class A {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public sealed class Sealed {
|
||||
public constructor Sealed()
|
||||
protected constructor Sealed(/*0*/ x: kotlin.Int)
|
||||
internal constructor Sealed(/*0*/ y: kotlin.Int, /*1*/ z: kotlin.Int)
|
||||
protected constructor Sealed(/*0*/ y: kotlin.Int, /*1*/ z: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
public fun </*0*/ T : Foo> doit(/*0*/ arg: T): T
|
||||
|
||||
public sealed class Foo {
|
||||
internal constructor Foo()
|
||||
protected constructor Foo()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun priority(/*0*/ op: Operation): kotlin.Int
|
||||
|
||||
public sealed class Operation {
|
||||
internal constructor Operation(/*0*/ left: kotlin.Int, /*1*/ right: kotlin.Int)
|
||||
protected constructor Operation(/*0*/ left: kotlin.Int, /*1*/ right: kotlin.Int)
|
||||
public final val left: kotlin.Int
|
||||
public final val right: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Tree {
|
||||
internal constructor Tree()
|
||||
protected constructor Tree()
|
||||
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 final fun max(): kotlin.Int
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Tree {
|
||||
internal constructor Tree()
|
||||
protected constructor Tree()
|
||||
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 final fun max(): kotlin.Int
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Tree {
|
||||
internal constructor Tree()
|
||||
protected constructor Tree()
|
||||
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 final fun max(): kotlin.Int
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun foo(/*0*/ s: Sealed): kotlin.Int
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
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
|
||||
|
||||
@@ -9,7 +9,7 @@ public interface Child : Parent {
|
||||
}
|
||||
|
||||
public sealed class Page : Parent {
|
||||
internal constructor Page()
|
||||
protected constructor Page()
|
||||
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
|
||||
|
||||
@@ -14,4 +14,4 @@ class A : Base()
|
||||
|
||||
package a
|
||||
|
||||
class B : <!INVISIBLE_MEMBER, SEALED_INHERITOR_IN_DIFFERENT_MODULE!>Base<!>()
|
||||
class B : <!SEALED_INHERITOR_IN_DIFFERENT_MODULE!>Base<!>()
|
||||
|
||||
@@ -11,7 +11,7 @@ package a {
|
||||
}
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ public interface A : Base {
|
||||
}
|
||||
|
||||
public sealed class B : Base {
|
||||
internal constructor B()
|
||||
protected constructor B()
|
||||
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
-1
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class Base {
|
||||
internal constructor Base()
|
||||
protected 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
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// ISSUE: KT-44861
|
||||
// DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
sealed class Foo() {
|
||||
class A : Foo()
|
||||
class B : Foo()
|
||||
}
|
||||
|
||||
fun Foo(kind: String = "A"): Foo = when (kind) {
|
||||
"A" -> Foo.A()
|
||||
"B" -> Foo.B()
|
||||
else -> throw Exception()
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val foo = <!SEALED_CLASS_CONSTRUCTOR_CALL!>Foo<!>()
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// ISSUE: KT-44861
|
||||
// DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
sealed class Foo() {
|
||||
class A : Foo()
|
||||
class B : Foo()
|
||||
}
|
||||
|
||||
fun Foo(kind: String = "A"): Foo = when (kind) {
|
||||
"A" -> Foo.A()
|
||||
"B" -> Foo.B()
|
||||
else -> throw Exception()
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val foo = Foo()
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package
|
||||
|
||||
public fun Foo(/*0*/ kind: kotlin.String = ...): Foo
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public sealed class Foo {
|
||||
protected constructor Foo()
|
||||
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 A : Foo {
|
||||
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 final class B : Foo {
|
||||
public constructor B()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public open class OpenClass2 {
|
||||
}
|
||||
|
||||
public sealed class Sealed {
|
||||
internal constructor Sealed()
|
||||
protected constructor Sealed()
|
||||
public final fun check(/*0*/ arg: Sealed.Sealed1): kotlin.Unit
|
||||
public open override /*1*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public sealed class My {
|
||||
internal constructor My(/*0*/ x: kotlin.Int?)
|
||||
protected constructor My(/*0*/ x: kotlin.Int?)
|
||||
public open val x: kotlin.Int?
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -51,7 +51,7 @@ public object D : A {
|
||||
}
|
||||
|
||||
public sealed class E : A {
|
||||
internal constructor E()
|
||||
protected constructor E()
|
||||
internal final override /*1*/ tailrec /*fake_override*/ fun baa(/*0*/ y: kotlin.Int): kotlin.Unit
|
||||
internal open override /*1*/ tailrec fun bar(/*0*/ y: kotlin.Int): kotlin.Unit
|
||||
protected open override /*1*/ tailrec fun baz(/*0*/ y: kotlin.Int): kotlin.Unit
|
||||
|
||||
@@ -51,7 +51,7 @@ public object D : A {
|
||||
}
|
||||
|
||||
public sealed class E : A {
|
||||
internal constructor E()
|
||||
protected constructor E()
|
||||
internal final override /*1*/ tailrec /*fake_override*/ fun baa(/*0*/ y: kotlin.Int): kotlin.Unit
|
||||
internal open override /*1*/ tailrec fun bar(/*0*/ y: kotlin.Int): kotlin.Unit
|
||||
protected open override /*1*/ tailrec fun baz(/*0*/ y: kotlin.Int): kotlin.Unit
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ val test3a = <!ENUM_CLASS_CONSTRUCTOR_CALL!><!INVISIBLE_MEMBER!>EnumClass<!>()<!
|
||||
|
||||
sealed class SealedClass
|
||||
typealias Test4 = SealedClass
|
||||
val test4 = <!SEALED_CLASS_CONSTRUCTOR_CALL!>Test4()<!>
|
||||
val test4a = <!SEALED_CLASS_CONSTRUCTOR_CALL!>SealedClass()<!>
|
||||
val test4 = <!SEALED_CLASS_CONSTRUCTOR_CALL!><!INVISIBLE_MEMBER!>Test4<!>()<!>
|
||||
val test4a = <!SEALED_CLASS_CONSTRUCTOR_CALL!><!INVISIBLE_MEMBER!>SealedClass<!>()<!>
|
||||
|
||||
class Outer {
|
||||
inner class Inner
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public final class Outer {
|
||||
}
|
||||
|
||||
public sealed class SealedClass {
|
||||
internal constructor SealedClass()
|
||||
protected constructor SealedClass()
|
||||
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
-1
@@ -152,7 +152,7 @@ package kotlin {
|
||||
}
|
||||
|
||||
public sealed value class D3 {
|
||||
internal constructor D3(/*0*/ x: kotlin.Int)
|
||||
protected constructor D3(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public object Last : S {
|
||||
}
|
||||
|
||||
public sealed class S {
|
||||
internal constructor S()
|
||||
protected constructor S()
|
||||
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
|
||||
|
||||
@@ -50,7 +50,7 @@ public final enum class MyEnum : kotlin.Enum<MyEnum!> {
|
||||
}
|
||||
|
||||
public sealed class X {
|
||||
internal constructor X()
|
||||
protected constructor X()
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package
|
||||
public fun test(/*0*/ a: A): kotlin.Unit
|
||||
|
||||
public sealed class A {
|
||||
internal constructor A()
|
||||
protected 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
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ public fun testSmartcastToSealedInSubjectInitializer1(/*0*/ x: kotlin.Any?): kot
|
||||
public fun testSmartcastToSealedInSubjectInitializer2(/*0*/ x: kotlin.Any?): kotlin.Unit
|
||||
|
||||
public sealed class Either {
|
||||
internal constructor Either()
|
||||
protected constructor Either()
|
||||
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
-1
@@ -120,7 +120,7 @@ private final class Outer {
|
||||
}
|
||||
|
||||
public sealed class SealedSpecialized : Foo<kotlin.String> {
|
||||
internal constructor SealedSpecialized()
|
||||
protected constructor SealedSpecialized()
|
||||
public open override /*1*/ /*fake_override*/ val kotlin.String.prop: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+2
-2
@@ -3,13 +3,13 @@ package
|
||||
public fun </*0*/ A, /*1*/ DA : DataType<A>, /*2*/ B, /*3*/ DB : DataType<B>, /*4*/ C, /*5*/ DC : DataType<C>, /*6*/ D, /*7*/ DD : DataType<D>, /*8*/ E, /*9*/ DE : DataType<E>, /*10*/ F, /*11*/ DF : DataType<F>, /*12*/ G, /*13*/ DG : DataType<G>, /*14*/ H, /*15*/ DH : DataType<H>> either8(/*0*/ firstName: kotlin.String, /*1*/ firstType: DA, /*2*/ secondName: kotlin.String, /*3*/ secondType: DB, /*4*/ thirdName: kotlin.String, /*5*/ thirdType: DC, /*6*/ fourthName: kotlin.String, /*7*/ fourthType: DD, /*8*/ fifthName: kotlin.String, /*9*/ fifthType: DE, /*10*/ sixthName: kotlin.String, /*11*/ sixthType: DF, /*12*/ seventhName: kotlin.String, /*13*/ seventhType: DG, /*14*/ eighthName: kotlin.String, /*15*/ eighthType: DH): DataType.NotNull.Partial<Either8<A, B, C, D, E, F, G, H>>
|
||||
|
||||
public sealed class DataType</*0*/ T> {
|
||||
internal constructor DataType</*0*/ T>()
|
||||
protected constructor DataType</*0*/ T>()
|
||||
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 NotNull</*0*/ T> : DataType<T> {
|
||||
internal constructor NotNull</*0*/ T>()
|
||||
protected constructor NotNull</*0*/ T>()
|
||||
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
-1
@@ -3,7 +3,7 @@ package
|
||||
public val tree: Tree.Inner<kotlin.Int, kotlin.String, kotlin.Unit, kotlin.Int>
|
||||
|
||||
public sealed class Tree</*0*/ TIndex, /*1*/ out TCommon, /*2*/ out TInner, /*3*/ out TLeaf> {
|
||||
internal constructor Tree</*0*/ TIndex, /*1*/ out TCommon, /*2*/ out TInner, /*3*/ out TLeaf>()
|
||||
protected constructor Tree</*0*/ TIndex, /*1*/ out TCommon, /*2*/ out TInner, /*3*/ out TLeaf>()
|
||||
public abstract val children: kotlin.collections.Map<TIndex, Tree<TIndex, TCommon, TInner, TLeaf>>
|
||||
public abstract val value: TCommon
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
sealed class Expr {
|
||||
internal constructor() /* primary */ {
|
||||
protected constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
FILE fqName:<root> fileName:/sealedClasses.kt
|
||||
CLASS CLASS name:Expr modality:SEALED visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Expr
|
||||
CONSTRUCTOR visibility:internal <> () returnType:<root>.Expr [primary]
|
||||
CONSTRUCTOR visibility:protected <> () returnType:<root>.Expr [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Expr modality:SEALED visibility:public superTypes:[kotlin.Any]'
|
||||
@@ -10,7 +10,7 @@ FILE fqName:<root> fileName:/sealedClasses.kt
|
||||
CONSTRUCTOR visibility:public <> (number:kotlin.Double) returnType:<root>.Expr.Const [primary]
|
||||
VALUE_PARAMETER name:number index:0 type:kotlin.Double
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Expr'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Expr'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Const modality:FINAL visibility:public superTypes:[<root>.Expr]'
|
||||
PROPERTY name:number visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:number type:kotlin.Double visibility:private [final]
|
||||
@@ -42,7 +42,7 @@ FILE fqName:<root> fileName:/sealedClasses.kt
|
||||
VALUE_PARAMETER name:e1 index:0 type:<root>.Expr
|
||||
VALUE_PARAMETER name:e2 index:1 type:<root>.Expr
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Expr'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Expr'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Sum modality:FINAL visibility:public superTypes:[<root>.Expr]'
|
||||
PROPERTY name:e1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:e1 type:<root>.Expr visibility:private [final]
|
||||
@@ -83,7 +83,7 @@ FILE fqName:<root> fileName:/sealedClasses.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Expr.NotANumber
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Expr.NotANumber [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Expr'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Expr'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:NotANumber modality:FINAL visibility:public superTypes:[<root>.Expr]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
expect sealed class Ops {
|
||||
internal expect constructor() /* primary */
|
||||
protected expect constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ expect class Add : Ops {
|
||||
}
|
||||
|
||||
sealed class Ops {
|
||||
internal constructor() /* primary */ {
|
||||
protected constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
FILE fqName:<root> fileName:/expectedSealedClass.kt
|
||||
CLASS CLASS name:Ops modality:SEALED visibility:public [expect] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ops
|
||||
CONSTRUCTOR visibility:internal <> () returnType:<root>.Ops [primary,expect]
|
||||
CONSTRUCTOR visibility:protected <> () returnType:<root>.Ops [primary,expect]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
@@ -33,7 +33,7 @@ FILE fqName:<root> fileName:/expectedSealedClass.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS CLASS name:Ops modality:SEALED visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ops
|
||||
CONSTRUCTOR visibility:internal <> () returnType:<root>.Ops [primary]
|
||||
CONSTRUCTOR visibility:protected <> () returnType:<root>.Ops [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Ops modality:SEALED visibility:public superTypes:[kotlin.Any]'
|
||||
@@ -54,7 +54,7 @@ FILE fqName:<root> fileName:/expectedSealedClass.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Add
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Add [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Ops'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Ops'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Add modality:FINAL visibility:public superTypes:[<root>.Ops]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ public final annotation class Ann : kotlin.Annotation {
|
||||
}
|
||||
|
||||
public sealed class Sealed {
|
||||
/*primary*/ @test.Ann internal constructor Sealed(/*0*/ @test.Ann z: test.Z)
|
||||
/*primary*/ @test.Ann protected constructor Sealed(/*0*/ @test.Ann z: test.Z)
|
||||
public final val z: test.Z
|
||||
public final fun <get-z>(): test.Z
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public final class Inheritor3 : test.SealedClass {
|
||||
}
|
||||
|
||||
public sealed class SealedClass {
|
||||
/*primary*/ internal constructor SealedClass()
|
||||
/*primary*/ protected constructor SealedClass()
|
||||
|
||||
public final class Inheritor1 : test.SealedClass {
|
||||
/*primary*/ public constructor Inheritor1()
|
||||
|
||||
Generated
+6
@@ -24487,6 +24487,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/sealed/kt44316.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt44861.kt")
|
||||
public void testKt44861() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/sealed/kt44861.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Local.kt")
|
||||
public void testLocal() throws Exception {
|
||||
|
||||
@@ -390,7 +390,7 @@ public class DescriptorUtils {
|
||||
}
|
||||
if (isSealedClass(classDescriptor)) {
|
||||
if (freedomForSealedInterfacesSupported) {
|
||||
return DescriptorVisibilities.INTERNAL;
|
||||
return DescriptorVisibilities.PROTECTED;
|
||||
} else {
|
||||
return DescriptorVisibilities.PRIVATE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ PsiJetFileStubImpl[package=test]
|
||||
CLASS[fqName=test.Sealed, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=Sealed, superNames=[]]
|
||||
MODIFIER_LIST[public sealed]
|
||||
PRIMARY_CONSTRUCTOR
|
||||
MODIFIER_LIST[internal]
|
||||
MODIFIER_LIST[protected]
|
||||
VALUE_PARAMETER_LIST
|
||||
CLASS_BODY
|
||||
CLASS[fqName=test.Sealed.Nested, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=Nested, superNames=[Sealed]]
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// ACTION: Create member function 'Foo.component2'
|
||||
// ACTION: Enable a trailing comma by default in the formatter
|
||||
// ACTION: Put arguments on separate lines
|
||||
// ERROR: Cannot access '<init>': it is protected in 'Foo'
|
||||
// ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function
|
||||
// ERROR: Destructuring declaration initializer of type Foo must have a 'component2()' function
|
||||
// ERROR: Sealed types cannot be instantiated
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public final enum class A.D.E : kotlin/Enum<A.D.E> {
|
||||
public sealed class A.D.F : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
internal constructor()
|
||||
protected constructor()
|
||||
|
||||
// nested class: G
|
||||
|
||||
|
||||
Reference in New Issue
Block a user