diff --git a/compiler/fir/analysis-tests/testData/loadCompiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt b/compiler/fir/analysis-tests/testData/loadCompiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt index 0abf465764c..08dd7c55828 100644 --- a/compiler/fir/analysis-tests/testData/loadCompiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt +++ b/compiler/fir/analysis-tests/testData/loadCompiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt @@ -12,7 +12,7 @@ public sealed class Sealed : R|kotlin/Any| { public final val z: R|test/Z| public get(): R|test/Z| - @R|test/Ann|() private constructor(@R|test/Ann|() z: R|test/Z|): R|test/Sealed| + @R|test/Ann|() internal constructor(@R|test/Ann|() z: R|test/Z|): R|test/Sealed| } diff --git a/compiler/fir/analysis-tests/testData/loadCompiledKotlin/class/SealedClass.txt b/compiler/fir/analysis-tests/testData/loadCompiledKotlin/class/SealedClass.txt index 53ae14787a1..7eb9f3de23d 100644 --- a/compiler/fir/analysis-tests/testData/loadCompiledKotlin/class/SealedClass.txt +++ b/compiler/fir/analysis-tests/testData/loadCompiledKotlin/class/SealedClass.txt @@ -14,7 +14,7 @@ public sealed class SealedClass : R|kotlin/Any| { } - private constructor(): R|test/SealedClass| + internal constructor(): R|test/SealedClass| } diff --git a/compiler/testData/compileJavaAgainstKotlin/sealed/Derived.java b/compiler/testData/compileJavaAgainstKotlin/sealed/Derived.java index bb17a9adc6b..f6c85d5b07f 100644 --- a/compiler/testData/compileJavaAgainstKotlin/sealed/Derived.java +++ b/compiler/testData/compileJavaAgainstKotlin/sealed/Derived.java @@ -3,4 +3,4 @@ package test; // It's not possible to inherit from Season (it's sealed in Kotlin) public class Derived extends Season { -} \ No newline at end of file +} diff --git a/compiler/testData/ir/irText/classes/sealedClasses.kt.txt b/compiler/testData/ir/irText/classes/sealedClasses.kt.txt index 6478ced9ad6..bd162164659 100644 --- a/compiler/testData/ir/irText/classes/sealedClasses.kt.txt +++ b/compiler/testData/ir/irText/classes/sealedClasses.kt.txt @@ -1,5 +1,5 @@ sealed class Expr { - private constructor() /* primary */ { + internal constructor() /* primary */ { super/*Any*/() /* () */ diff --git a/compiler/testData/ir/irText/classes/sealedClasses.txt b/compiler/testData/ir/irText/classes/sealedClasses.txt index 5c1b2a0254b..f8234fa55d8 100644 --- a/compiler/testData/ir/irText/classes/sealedClasses.txt +++ b/compiler/testData/ir/irText/classes/sealedClasses.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/sealedClasses.kt CLASS CLASS name:Expr modality:SEALED visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Expr - CONSTRUCTOR visibility:private <> () returnType:.Expr [primary] + CONSTRUCTOR visibility:internal <> () returnType:.Expr [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [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: fileName:/sealedClasses.kt CONSTRUCTOR visibility:public <> (number:kotlin.Double) returnType:.Expr.Const [primary] VALUE_PARAMETER name:number index:0 type:kotlin.Double BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Expr' + DELEGATING_CONSTRUCTOR_CALL 'internal constructor () [primary] declared in .Expr' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Const modality:FINAL visibility:public superTypes:[.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: fileName:/sealedClasses.kt VALUE_PARAMETER name:e1 index:0 type:.Expr VALUE_PARAMETER name:e2 index:1 type:.Expr BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Expr' + DELEGATING_CONSTRUCTOR_CALL 'internal constructor () [primary] declared in .Expr' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Sum modality:FINAL visibility:public superTypes:[.Expr]' PROPERTY name:e1 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:e1 type:.Expr visibility:private [final] @@ -83,7 +83,7 @@ FILE fqName: fileName:/sealedClasses.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Expr.NotANumber CONSTRUCTOR visibility:private <> () returnType:.Expr.NotANumber [primary] BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Expr' + DELEGATING_CONSTRUCTOR_CALL 'internal constructor () [primary] declared in .Expr' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:NotANumber modality:FINAL visibility:public superTypes:[.Expr]' FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt.txt index 6f95f6af0b4..8e4b78d0641 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt.txt @@ -1,5 +1,5 @@ expect sealed class Ops { - private expect constructor() /* primary */ + internal expect constructor() /* primary */ } @@ -9,7 +9,7 @@ expect class Add : Ops { } sealed class Ops { - private constructor() /* primary */ { + internal constructor() /* primary */ { super/*Any*/() /* () */ diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt index 77cb758d6ba..5d65736964f 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/expectedSealedClass.kt CLASS CLASS name:Ops modality:SEALED visibility:public [expect] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ops - CONSTRUCTOR visibility:private <> () returnType:.Ops [primary,expect] + CONSTRUCTOR visibility:internal <> () returnType:.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: fileName:/expectedSealedClass.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS CLASS name:Ops modality:SEALED visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ops - CONSTRUCTOR visibility:private <> () returnType:.Ops [primary] + CONSTRUCTOR visibility:internal <> () returnType:.Ops [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [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: fileName:/expectedSealedClass.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Add CONSTRUCTOR visibility:public <> () returnType:.Add [primary] BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Ops' + DELEGATING_CONSTRUCTOR_CALL 'internal constructor () [primary] declared in .Ops' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Add modality:FINAL visibility:public superTypes:[.Ops]' FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt index cbef850e2ac..50112e06d47 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/HiddenConstructorWithInlineClassParameters.txt @@ -5,7 +5,7 @@ public final annotation class Ann : kotlin.Annotation { } public sealed class Sealed { - /*primary*/ @test.Ann private constructor Sealed(/*0*/ @test.Ann z: test.Z) + /*primary*/ @test.Ann internal constructor Sealed(/*0*/ @test.Ann z: test.Z) public final val z: test.Z public final fun (): test.Z diff --git a/compiler/testData/loadJava/compiledKotlin/class/SealedClass.txt b/compiler/testData/loadJava/compiledKotlin/class/SealedClass.txt index 0b47abf1626..af4e2a97b3e 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/SealedClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/class/SealedClass.txt @@ -9,7 +9,7 @@ public final class Inheritor3 : test.SealedClass { } public sealed class SealedClass { - /*primary*/ private constructor SealedClass() + /*primary*/ internal constructor SealedClass() public final class Inheritor1 : test.SealedClass { /*primary*/ public constructor Inheritor1() diff --git a/idea/testData/decompiler/stubBuilder/Sealed/Sealed.txt b/idea/testData/decompiler/stubBuilder/Sealed/Sealed.txt index 7fe2194334f..97af5678c57 100644 --- a/idea/testData/decompiler/stubBuilder/Sealed/Sealed.txt +++ b/idea/testData/decompiler/stubBuilder/Sealed/Sealed.txt @@ -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[private] + MODIFIER_LIST[internal] VALUE_PARAMETER_LIST CLASS_BODY CLASS[fqName=test.Sealed.Nested, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=Nested, superNames=[Sealed]] diff --git a/libraries/tools/kotlinp/testData/NestedClasses.txt b/libraries/tools/kotlinp/testData/NestedClasses.txt index 0b631ab866e..0e604d1bc9e 100644 --- a/libraries/tools/kotlinp/testData/NestedClasses.txt +++ b/libraries/tools/kotlinp/testData/NestedClasses.txt @@ -55,7 +55,7 @@ public final enum class A.D.E : kotlin/Enum { public sealed class A.D.F : kotlin/Any { // signature: ()V - private constructor() + internal constructor() // nested class: G