diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 152049a8f56..5749ee5d155 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -24415,12 +24415,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/sealed/NeverFinal.kt"); } - @Test - @TestMetadata("NeverInterface.kt") - public void testNeverInterface() throws Exception { - runTest("compiler/testData/diagnostics/tests/sealed/NeverInterface.kt"); - } - @Test @TestMetadata("NeverObject.kt") public void testNeverObject() throws Exception { @@ -27255,12 +27249,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.kt"); } - @Test - @TestMetadata("noTopLevelSealedInheritance.kt") - public void testNoTopLevelSealedInheritance() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt"); - } - @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt index 926cddf106e..1193a21ebac 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt @@ -25,9 +25,9 @@ fun main() { join(1, "4", *a) join(1, "4", *a, *a, "3") join(1, "4", *a, *b, "3") - join(a = a, x = 1) - join(a = b, x = 1) - join(a = a, x = 1) + join(a = a, x = 1) + join(a = b, x = 1) + join(a = a, x = 1) joinG(1, "2") joinG(*1, "2") @@ -40,7 +40,7 @@ fun main() { joinG(1, "4", *a, "3") joinG(1, "4", *a) joinG(1, "4", *a, *a, "3") - joinG(a = a, x = 1) + joinG(a = a, x = 1) joinG(1, "2") joinG(*1, "2") @@ -53,7 +53,7 @@ fun main() { joinG(1, "4", *a, "3") joinG(1, "4", *a) joinG(1, "4", *a, *a, "3") - joinG(a = a, x = 1) + joinG(a = a, x = 1) val x1 = joinT(1, "2") checkSubtype(x1) @@ -69,7 +69,7 @@ fun main() { checkSubtype(x9) val x10 = joinT(1, "4", *a, *a, "3") checkSubtype(x10) - val x11 = joinT(a = a, x = 1) + val x11 = joinT(a = a, x = 1) checkSubtype(x11) val x12 = joinT(x = 1, a = a) checkSubtype(x12) diff --git a/compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.txt b/compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.txt index 5a1f87b58de..843867f4337 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.txt +++ b/compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.txt @@ -1,7 +1,7 @@ package public sealed data class My { - private constructor My(/*0*/ x: kotlin.Int) + internal 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 @@ -29,3 +29,4 @@ public sealed data class My { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.txt b/compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.txt index a3462779ed6..9e03553cdbf 100644 --- a/compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.txt +++ b/compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.txt @@ -77,30 +77,31 @@ public object KT32183 { } public sealed class ProjectJob { - private constructor ProjectJob() + internal 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, /*1*/ R : KT32183.ProjectJob.ProcessResources> : KT32183.ProjectJob { - private constructor Process, /*1*/ R : KT32183.ProjectJob.ProcessResources>() + internal constructor Process, /*1*/ R : KT32183.ProjectJob.ProcessResources>() 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> { - private constructor ProcessExecutable>() + internal constructor ProcessExecutable>() 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> { - private constructor ProcessResources>() + internal constructor ProcessResources>() 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 } } } + diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/kt32388.txt b/compiler/testData/diagnostics/tests/inference/nothingType/kt32388.txt index 790a1da91cd..77f67644feb 100644 --- a/compiler/testData/diagnostics/tests/inference/nothingType/kt32388.txt +++ b/compiler/testData/diagnostics/tests/inference/nothingType/kt32388.txt @@ -4,7 +4,7 @@ public fun Either.recover(/*0*/ f: (A) -> B): Either A.right(): Either public sealed class Either { - private constructor Either() + internal 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 @@ -25,3 +25,4 @@ public sealed class Either { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.txt b/compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.txt index 0933b86cc72..d5932702482 100644 --- a/compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.txt +++ b/compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.txt @@ -174,7 +174,7 @@ public abstract inline class D2 { } public sealed inline class D3 { - private constructor D3(/*0*/ x: kotlin.Int) + internal 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 @@ -190,3 +190,4 @@ public final data inline class D4 { public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/javac/inners/Nested.txt b/compiler/testData/diagnostics/tests/javac/inners/Nested.txt index 53795353575..9b8503cf487 100644 --- a/compiler/testData/diagnostics/tests/javac/inners/Nested.txt +++ b/compiler/testData/diagnostics/tests/javac/inners/Nested.txt @@ -21,13 +21,13 @@ package p { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public sealed class Sealed1 { - private constructor Sealed1() + internal 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 { - private constructor Sealed2() + internal 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 @@ -35,3 +35,4 @@ package p { } } } + diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt index 7c5153ea00c..18f8bd789ee 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt @@ -155,7 +155,7 @@ package illegal_modifiers { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public sealed inner class Inner { - private constructor Inner() + internal 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 @@ -176,3 +176,4 @@ package illegal_modifiers { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.txt b/compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.txt index f15679a2cab..4fab4c6ad6e 100644 --- a/compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.txt +++ b/compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.txt @@ -30,7 +30,7 @@ package test { } public sealed class S { - private constructor S() + internal 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 diff --git a/compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.txt b/compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.txt index b476ae9b950..8e6a3c4f8e7 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.txt +++ b/compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.txt @@ -70,7 +70,7 @@ public expect interface BaseE { } public sealed class BaseEImpl : BaseE { - private constructor BaseEImpl() + internal 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 @@ -140,3 +140,4 @@ public final class DerivedC2 : BaseCImpl { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAlias.txt b/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAlias.txt index 74e8c79ce25..36e27006142 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAlias.txt +++ b/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAlias.txt @@ -23,7 +23,7 @@ public sealed expect class Presence { package public sealed class P { - private constructor P() + internal 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 diff --git a/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAliasTopLevel.txt b/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAliasTopLevel.txt index 8a518d78c8c..16eaf0abd1a 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAliasTopLevel.txt +++ b/compiler/testData/diagnostics/tests/multiplatform/sealedTypeAliasTopLevel.txt @@ -37,7 +37,7 @@ public actual object Online : P { } public sealed class P { - private constructor P() + internal 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 diff --git a/compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition/varargs.kt b/compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition/varargs.kt index 18e4c5d763f..8e171bdd5c0 100644 --- a/compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition/varargs.kt +++ b/compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition/varargs.kt @@ -29,12 +29,12 @@ fun foo4( fun main() { foo1(1, 2, p2 = "3", 4.0) - foo1(p1 = intArrayOf(1, 2), "3", p3 = 4.0) + foo1(p1 = intArrayOf(1, 2), "3", p3 = 4.0) foo1(p2 = "3", 4.0) foo2(p1 = 1, "2", "3", p3 = 4.0) - foo2(1, p2 = arrayOf("2", "3"), 4.0) + foo2(1, p2 = arrayOf("2", "3"), 4.0) foo2(1, p3 = 3.0) foo3(p1 = 1, "2", 3.0, 4.0) @@ -52,6 +52,6 @@ fun main() { foo2(1, p3 = 2.0, *arrayOf("3", "4")) foo2(1, p3 = 2.0, p2 = arrayOf("3", "4")) - foo3(1, p3 = doubleArrayOf(2.0, 3.0), "4") - foo3(1, p3 = doubleArrayOf(2.0, 3.0), p2 = "4") + foo3(1, p3 = doubleArrayOf(2.0, 3.0), "4") + foo3(1, p3 = doubleArrayOf(2.0, 3.0), p2 = "4") } diff --git a/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt b/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt index f7a662f468b..2600c6bd87a 100644 --- a/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt +++ b/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt @@ -1,10 +1,10 @@ sealed class Base class Derived: Base() { - class Derived2: Base() + class Derived2: Base() } fun test() { - class Local: Base() + class Local: Base() } diff --git a/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.txt b/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.txt index 8c7dbf3d5aa..7f1ab161a05 100644 --- a/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.txt +++ b/compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.txt @@ -3,7 +3,7 @@ package public fun test(): kotlin.Unit public sealed class Base { - private constructor Base() + internal 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 @@ -22,3 +22,4 @@ public final class Derived : Base { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/DoubleInner.txt b/compiler/testData/diagnostics/tests/sealed/DoubleInner.txt index 67b084f0918..050d26bc834 100644 --- a/compiler/testData/diagnostics/tests/sealed/DoubleInner.txt +++ b/compiler/testData/diagnostics/tests/sealed/DoubleInner.txt @@ -1,7 +1,7 @@ package public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -50,3 +50,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.txt index 48902800437..425b7c75ed6 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.txt @@ -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 { - private constructor Expr() + internal 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,8 +26,9 @@ public final class ForStmt : Stmt { } public sealed class Stmt { - private constructor Stmt() + internal 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 } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.txt index afa4a4d3207..2559c794d81 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.txt @@ -1,7 +1,7 @@ package public sealed class Base { - private constructor Base() + internal 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 { - private constructor A() + internal 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 { - private constructor A2() + internal 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 { - private constructor B() + internal 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 { - private constructor B1() + internal 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 @@ -76,3 +76,4 @@ public sealed class Base { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.txt index d093f4f9b27..ed10fcf8de7 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.txt @@ -5,14 +5,14 @@ public fun test2(/*0*/ a: A): kotlin.Any public fun test3(/*0*/ a: A): kotlin.Any public sealed class A { - private constructor A() + internal 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 { - private constructor B() + internal 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 @@ -31,3 +31,4 @@ public final class D : B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.txt index 22dbcb824c9..6052d5fbd87 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -44,3 +44,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.txt index 148441cbfd3..cd86b738170 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed() + internal 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 @@ -43,3 +43,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.txt index fa09d1fe85b..353be8f9350 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.txt @@ -6,7 +6,7 @@ public fun fooWithElse(/*0*/ s: Sealed): kotlin.Int public fun fooWithoutElse(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed() + internal 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 @@ -67,3 +67,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.txt index 22dbcb824c9..6052d5fbd87 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -44,3 +44,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.txt index 7d59920c4e0..9822f3cd0f9 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -52,3 +52,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.txt index a917d1e29c1..b352827f224 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed, /*1*/ nf: Sealed.NonFirst): kotlin.Int public sealed class Sealed { - private constructor Sealed() + internal 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 { - private constructor NonFirst() + internal 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 @@ -43,3 +43,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.txt index a87f45ed06f..3e989e300bb 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed?): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -44,3 +44,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.txt index b8887b3f613..5abe4e1702c 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -56,3 +56,4 @@ public sealed class Sealed { public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.txt b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.txt index 22dbcb824c9..6052d5fbd87 100644 --- a/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.txt +++ b/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -44,3 +44,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/Local.txt b/compiler/testData/diagnostics/tests/sealed/Local.txt index 3eb8bb9345e..bbb25c8a302 100644 --- a/compiler/testData/diagnostics/tests/sealed/Local.txt +++ b/compiler/testData/diagnostics/tests/sealed/Local.txt @@ -1,7 +1,7 @@ package public sealed class Sealed { - private constructor Sealed() + internal 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 @@ -42,3 +42,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NestedSealed.txt b/compiler/testData/diagnostics/tests/sealed/NestedSealed.txt index 5860a568d5f..10a7db9e368 100644 --- a/compiler/testData/diagnostics/tests/sealed/NestedSealed.txt +++ b/compiler/testData/diagnostics/tests/sealed/NestedSealed.txt @@ -5,13 +5,13 @@ public fun foo(/*0*/ b: Base): kotlin.Int public fun gav(/*0*/ b: Base?): kotlin.Int public sealed class Base { - private constructor Base() + internal 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 { - private constructor A() + internal 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 { - private constructor B() + internal 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 @@ -52,3 +52,4 @@ public sealed class Base { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NeverConstructed.txt b/compiler/testData/diagnostics/tests/sealed/NeverConstructed.txt index 3c9d5cefd04..f210e874257 100644 --- a/compiler/testData/diagnostics/tests/sealed/NeverConstructed.txt +++ b/compiler/testData/diagnostics/tests/sealed/NeverConstructed.txt @@ -1,9 +1,10 @@ package public sealed class Base { - private constructor Base() + internal 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 public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt b/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt index f3a378e55a3..b7342a1c323 100644 --- a/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt +++ b/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt @@ -2,8 +2,8 @@ class A { sealed class Base } -class Derived : A.Base() +class Derived : A.Base() fun test() { - class DerivedLocal : A.Base() + class DerivedLocal : A.Base() } diff --git a/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.txt b/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.txt index 06081addd8b..faaa729b10a 100644 --- a/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.txt +++ b/compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.txt @@ -9,7 +9,7 @@ public final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public sealed class Base { - private constructor Base() + internal 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 @@ -22,3 +22,4 @@ public final class Derived : A.Base { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/sealed/NeverFinal.txt b/compiler/testData/diagnostics/tests/sealed/NeverFinal.txt index bb9b3fc8d1c..4f963ec4c07 100644 --- a/compiler/testData/diagnostics/tests/sealed/NeverFinal.txt +++ b/compiler/testData/diagnostics/tests/sealed/NeverFinal.txt @@ -1,8 +1,9 @@ package public sealed class Base { - private constructor Base() + internal 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 } + diff --git a/compiler/testData/diagnostics/tests/sealed/NeverInterface.fir.kt b/compiler/testData/diagnostics/tests/sealed/NeverInterface.fir.kt deleted file mode 100644 index d70b4d3f01b..00000000000 --- a/compiler/testData/diagnostics/tests/sealed/NeverInterface.fir.kt +++ /dev/null @@ -1,3 +0,0 @@ -sealed interface Base { - -} diff --git a/compiler/testData/diagnostics/tests/sealed/NeverInterface.kt b/compiler/testData/diagnostics/tests/sealed/NeverInterface.kt deleted file mode 100644 index b22a4a90a43..00000000000 --- a/compiler/testData/diagnostics/tests/sealed/NeverInterface.kt +++ /dev/null @@ -1,3 +0,0 @@ -sealed interface Base { - -} diff --git a/compiler/testData/diagnostics/tests/sealed/NeverInterface.txt b/compiler/testData/diagnostics/tests/sealed/NeverInterface.txt deleted file mode 100644 index f2ed48d03d4..00000000000 --- a/compiler/testData/diagnostics/tests/sealed/NeverInterface.txt +++ /dev/null @@ -1,7 +0,0 @@ -package - -public sealed interface 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 -} diff --git a/compiler/testData/diagnostics/tests/sealed/NeverOpen.txt b/compiler/testData/diagnostics/tests/sealed/NeverOpen.txt index bb9b3fc8d1c..4f963ec4c07 100644 --- a/compiler/testData/diagnostics/tests/sealed/NeverOpen.txt +++ b/compiler/testData/diagnostics/tests/sealed/NeverOpen.txt @@ -1,8 +1,9 @@ package public sealed class Base { - private constructor Base() + internal 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 } + diff --git a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.txt b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.txt index 22dbcb824c9..6052d5fbd87 100644 --- a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.txt +++ b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -44,3 +44,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.txt b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.txt index 22dbcb824c9..6052d5fbd87 100644 --- a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.txt +++ b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -44,3 +44,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.txt b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.txt index 3b3b7d2df39..33444b8be1b 100644 --- a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.txt +++ b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed(/*0*/ x: kotlin.Int) + internal 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 @@ -61,3 +61,4 @@ public sealed class Sealed { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.txt b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.txt index 9a98e4af50f..fa27bc4811d 100644 --- a/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.txt +++ b/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed() + internal 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 @@ -36,3 +36,4 @@ public sealed class Sealed { } } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.txt b/compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.txt index 0a27f00ee97..18a46c7808f 100644 --- a/compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.txt +++ b/compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.txt @@ -3,7 +3,7 @@ package public sealed class Sealed { public constructor Sealed() protected constructor Sealed(/*0*/ x: kotlin.Int) - private constructor Sealed(/*0*/ y: kotlin.Int, /*1*/ z: kotlin.Int) + internal 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 @@ -17,3 +17,4 @@ public sealed class Sealed { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/NotFinal.txt b/compiler/testData/diagnostics/tests/sealed/NotFinal.txt index 3d5953b9dfc..23ce8ce7f29 100644 --- a/compiler/testData/diagnostics/tests/sealed/NotFinal.txt +++ b/compiler/testData/diagnostics/tests/sealed/NotFinal.txt @@ -3,7 +3,7 @@ package public fun doit(/*0*/ arg: T): T public sealed class Foo { - private constructor Foo() + internal 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 @@ -22,3 +22,4 @@ public sealed class Foo { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/OperationWhen.txt b/compiler/testData/diagnostics/tests/sealed/OperationWhen.txt index 3505739dea2..cebdb6ea323 100644 --- a/compiler/testData/diagnostics/tests/sealed/OperationWhen.txt +++ b/compiler/testData/diagnostics/tests/sealed/OperationWhen.txt @@ -3,7 +3,7 @@ package public fun priority(/*0*/ op: Operation): kotlin.Int public sealed class Operation { - private constructor Operation(/*0*/ left: kotlin.Int, /*1*/ right: kotlin.Int) + internal 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 @@ -51,3 +51,4 @@ public sealed class Operation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/RedundantAbstract.txt b/compiler/testData/diagnostics/tests/sealed/RedundantAbstract.txt index bb9b3fc8d1c..4f963ec4c07 100644 --- a/compiler/testData/diagnostics/tests/sealed/RedundantAbstract.txt +++ b/compiler/testData/diagnostics/tests/sealed/RedundantAbstract.txt @@ -1,8 +1,9 @@ package public sealed class Base { - private constructor Base() + internal 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 } + diff --git a/compiler/testData/diagnostics/tests/sealed/TreeWhen.txt b/compiler/testData/diagnostics/tests/sealed/TreeWhen.txt index bc46a439415..0b16ddc38f4 100644 --- a/compiler/testData/diagnostics/tests/sealed/TreeWhen.txt +++ b/compiler/testData/diagnostics/tests/sealed/TreeWhen.txt @@ -1,7 +1,7 @@ package public sealed class Tree { - private constructor Tree() + internal 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 @@ -34,3 +34,4 @@ public sealed class Tree { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.txt b/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.txt index bc46a439415..0b16ddc38f4 100644 --- a/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.txt +++ b/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.txt @@ -1,7 +1,7 @@ package public sealed class Tree { - private constructor Tree() + internal 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 @@ -34,3 +34,4 @@ public sealed class Tree { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.txt b/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.txt index 8a1ace58713..64955fd0483 100644 --- a/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.txt +++ b/compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.txt @@ -1,7 +1,7 @@ package public sealed class Tree { - private constructor Tree() + internal 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 @@ -42,3 +42,4 @@ public sealed class Tree { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.txt b/compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.txt index 87745e29ea5..50319d715ed 100644 --- a/compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.txt +++ b/compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.txt @@ -3,8 +3,9 @@ package public fun foo(/*0*/ s: Sealed): kotlin.Int public sealed class Sealed { - private constructor Sealed() + internal 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 } + diff --git a/compiler/testData/diagnostics/tests/sealed/WithInterface.txt b/compiler/testData/diagnostics/tests/sealed/WithInterface.txt index 755910f4b4e..62bb5d50b1f 100644 --- a/compiler/testData/diagnostics/tests/sealed/WithInterface.txt +++ b/compiler/testData/diagnostics/tests/sealed/WithInterface.txt @@ -9,7 +9,7 @@ public interface Child : Parent { } public sealed class Page : Parent { - private constructor Page() + internal 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 @@ -34,3 +34,4 @@ public interface Parent { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.txt b/compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.txt index 898674e8430..37cc7ceaaf3 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.txt @@ -65,7 +65,7 @@ public open class OpenClass2 { } public sealed class Sealed { - private constructor Sealed() + internal 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 @@ -88,3 +88,4 @@ public sealed class Sealed { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/smartCasts/openInSealed.txt b/compiler/testData/diagnostics/tests/smartCasts/openInSealed.txt index ec78d0d7a29..050f6bbc035 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/openInSealed.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/openInSealed.txt @@ -1,9 +1,10 @@ package public sealed class My { - private constructor My(/*0*/ x: kotlin.Int?) + internal 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 public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.fir.kt deleted file mode 100644 index 1e1cc9ad267..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.fir.kt +++ /dev/null @@ -1,5 +0,0 @@ -// !LANGUAGE: -TopLevelSealedInheritance - -sealed class Base - -class Derived : Base() diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt deleted file mode 100644 index 6510deffede..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt +++ /dev/null @@ -1,5 +0,0 @@ -// !LANGUAGE: -TopLevelSealedInheritance - -sealed class Base - -class Derived : Base() diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.txt deleted file mode 100644 index 6e259fee7a3..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.txt +++ /dev/null @@ -1,15 +0,0 @@ -package - -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 : 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 -} diff --git a/compiler/testData/diagnostics/tests/tailRecOnVirtualMember.txt b/compiler/testData/diagnostics/tests/tailRecOnVirtualMember.txt index 9206c55d728..1860f2bcccb 100644 --- a/compiler/testData/diagnostics/tests/tailRecOnVirtualMember.txt +++ b/compiler/testData/diagnostics/tests/tailRecOnVirtualMember.txt @@ -51,7 +51,7 @@ public object D : A { } public sealed class E : A { - private constructor E() + internal 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 @@ -123,3 +123,4 @@ public final enum class G : kotlin.Enum { public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): G public final /*synthesized*/ fun values(): kotlin.Array } + diff --git a/compiler/testData/diagnostics/tests/tailRecOnVirtualMemberError.txt b/compiler/testData/diagnostics/tests/tailRecOnVirtualMemberError.txt index 9206c55d728..1860f2bcccb 100644 --- a/compiler/testData/diagnostics/tests/tailRecOnVirtualMemberError.txt +++ b/compiler/testData/diagnostics/tests/tailRecOnVirtualMemberError.txt @@ -51,7 +51,7 @@ public object D : A { } public sealed class E : A { - private constructor E() + internal 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 @@ -123,3 +123,4 @@ public final enum class G : kotlin.Enum { public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): G public final /*synthesized*/ fun values(): kotlin.Array } + diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt index cafaeda2aa2..e0ea89e6131 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt @@ -17,8 +17,8 @@ val test3a = EnumClass()Test4() -val test4a = SealedClass() +val test4 = Test4() +val test4a = SealedClass() class Outer { inner class Inner diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.txt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.txt index 49ad3823820..766cd3606c4 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.txt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.txt @@ -66,7 +66,7 @@ public final class Outer { } public sealed class SealedClass { - private constructor SealedClass() + internal 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 @@ -76,3 +76,4 @@ public typealias Test2 = AnnotationClass public typealias Test3 = EnumClass public typealias Test4 = SealedClass public typealias Test5 = Outer.Inner + diff --git a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt index 9a4bc272ef9..dd47c0f0768 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.fir.kt @@ -1,4 +1,5 @@ // !SKIP_JAVAC +// !API_VERSION: 1.4 // !LANGUAGE: -InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt index fc43d08330e..553616f7713 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/basicValueClassDeclarationDisabled.kt @@ -1,4 +1,5 @@ // !SKIP_JAVAC +// !API_VERSION: 1.4 // !LANGUAGE: -InlineClasses // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -6,11 +7,11 @@ package kotlin.jvm annotation class JvmInline -value class Foo(val x: Int) +value class Foo(val x: Int) value annotation class InlineAnn value object InlineObject value enum class InlineEnum @JvmInline -value class NotVal(x: Int) +value class NotVal(x: Int) diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.txt b/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.txt index 61739d5e67b..432311e420f 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.txt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassDeclarationCheck.txt @@ -152,7 +152,7 @@ package kotlin { } public sealed value class D3 { - private constructor D3(/*0*/ x: kotlin.Int) + internal 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 @@ -177,3 +177,4 @@ package kotlin { } } } + diff --git a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.txt b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.txt index 41884e0fcb4..7a7ce296cff 100644 --- a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.txt +++ b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.txt @@ -26,8 +26,9 @@ public object Last : S { } public sealed class S { - private constructor S() + internal 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 } + diff --git a/compiler/testData/diagnostics/tests/when/RedundantElse.txt b/compiler/testData/diagnostics/tests/when/RedundantElse.txt index 263919657b6..70da44887fa 100644 --- a/compiler/testData/diagnostics/tests/when/RedundantElse.txt +++ b/compiler/testData/diagnostics/tests/when/RedundantElse.txt @@ -50,7 +50,7 @@ public final enum class MyEnum : kotlin.Enum { } public sealed class X { - private constructor X() + internal 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 @@ -69,3 +69,4 @@ public sealed class X { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/tests/when/TopLevelSealed.txt b/compiler/testData/diagnostics/tests/when/TopLevelSealed.txt index 36836d7ba57..888bd637178 100644 --- a/compiler/testData/diagnostics/tests/when/TopLevelSealed.txt +++ b/compiler/testData/diagnostics/tests/when/TopLevelSealed.txt @@ -3,7 +3,7 @@ package public fun test(/*0*/ a: A): kotlin.Unit public sealed class A { - private constructor A() + internal 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 @@ -29,3 +29,4 @@ public final class D : A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/when/withSubjectVariable/smartcastToSealed.txt b/compiler/testData/diagnostics/tests/when/withSubjectVariable/smartcastToSealed.txt index d38333c2d27..deebd0be736 100644 --- a/compiler/testData/diagnostics/tests/when/withSubjectVariable/smartcastToSealed.txt +++ b/compiler/testData/diagnostics/tests/when/withSubjectVariable/smartcastToSealed.txt @@ -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 { - private constructor Either() + internal 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 @@ -23,3 +23,4 @@ public final class Right : Either { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility/specialization.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility/specialization.txt index 24d71c99ca1..64beffedaa0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility/specialization.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility/specialization.txt @@ -120,7 +120,7 @@ private final class Outer { } public sealed class SealedSpecialized : Foo { - private constructor SealedSpecialized() + internal 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 @@ -181,3 +181,4 @@ public open class UnspecializedFromDerived : FooDerived { public open override /*1*/ /*fake_override*/ fun test(/*0*/ p: kotlin.String): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt41644.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt41644.txt index 8fc7f0bc599..46c0ad5c342 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt41644.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt41644.txt @@ -3,13 +3,13 @@ package public fun , /*2*/ B, /*3*/ DB : DataType, /*4*/ C, /*5*/ DC : DataType, /*6*/ D, /*7*/ DD : DataType, /*8*/ E, /*9*/ DE : DataType, /*10*/ F, /*11*/ DF : DataType, /*12*/ G, /*13*/ DG : DataType, /*14*/ H, /*15*/ DH : DataType> 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> public sealed class DataType { - private constructor DataType() + internal constructor DataType() 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 : DataType { - private constructor NotNull() + internal constructor NotNull() 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,3 +50,4 @@ public final class Tuple8, /*2*/ B, /*3*/ DB : D public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt42195.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt42195.txt index 2655dbd7a0b..f6134461709 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt42195.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/performance/kt42195.txt @@ -3,7 +3,7 @@ package public val tree: Tree.Inner public sealed class Tree { - private constructor Tree() + internal constructor Tree() public abstract val children: kotlin.collections.Map> public abstract val value: TCommon public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -37,3 +37,4 @@ public sealed class Tree