diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java index ef39e47855d..7c45a18cef8 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java @@ -925,6 +925,8 @@ public abstract class MemberCodegen vo + fk()() } +} + +fun box() = B().test()() + +// FILE: a.kt +package a + +open class A { + protected var vo = "O" + private set + + protected var vk = "" + private set + + fun fk() = { -> + vk = "K" + vk + } +} diff --git a/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt b/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt new file mode 100644 index 00000000000..ad4e2e2cd3c --- /dev/null +++ b/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt @@ -0,0 +1,26 @@ +// FILE: accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt +import a.A + +class B : A() { + fun test() = object { + override fun toString() = vo + fk()() + } +} + +fun box() = B().test().toString() + +// FILE: a.kt +package a + +open class A { + protected var vo = "O" + private set + + protected var vk = "" + private set + + fun fk() = { -> + vk = "K" + vk + } +} diff --git a/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt b/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt new file mode 100644 index 00000000000..e3fdc8a88cf --- /dev/null +++ b/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt @@ -0,0 +1,24 @@ +// FILE: accessorForProtectedPropertyWithPrivateSetterViaSuper.kt +import a.A + +class B : A() { + fun test() = { -> super.vo + fk()() } +} + +fun box() = B().test()() + +// FILE: a.kt +package a + +open class A { + protected var vo = "O" + private set + + protected var vk = "" + private set + + fun fk() = { -> + vk = "K" + vk + } +} diff --git a/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt b/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt new file mode 100644 index 00000000000..7ae0427e810 --- /dev/null +++ b/compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt @@ -0,0 +1,26 @@ +// FILE: accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt +import a.A + +open class A2 : A() + +class B : A2() { + fun test() = { -> vo + fk()() } +} + +fun box() = B().test()() + +// FILE: a.kt +package a + +open class A { + protected var vo = "O" + private set + + protected var vk = "" + private set + + fun fk() = { -> + vk = "K" + vk + } +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt new file mode 100644 index 00000000000..130fcfd3b53 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt @@ -0,0 +1,22 @@ +// FILE: accessorForProtectedPropertyWithPrivateSetter.kt +import a.A + +class B : A() { + fun test() = { -> vo + fk()() } +} + +// FILE: a.kt +package a + +open class A { + protected var vo = "O" + private set + + protected var vk = "" + private set + + fun fk() = { -> + vk = "K" + vk + } +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.txt b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.txt new file mode 100644 index 00000000000..f99c1c7f91a --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.txt @@ -0,0 +1,44 @@ +@kotlin.Metadata +final class B$test$1 { + // source: 'accessorForProtectedPropertyWithPrivateSetter.kt' + enclosing method B.test()Lkotlin/jvm/functions/Function0; + synthetic final field this$0: B + inner (anonymous) class B$test$1 + method (p0: B): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public final class B { + // source: 'accessorForProtectedPropertyWithPrivateSetter.kt' + inner (anonymous) class B$test$1 + public method (): void + public synthetic final static method access$getVo$p(p0: B): java.lang.String + public final @org.jetbrains.annotations.NotNull method test(): kotlin.jvm.functions.Function0 +} + +@kotlin.Metadata +final class a/A$fk$1 { + // source: 'a.kt' + enclosing method a/A.fk()Lkotlin/jvm/functions/Function0; + synthetic final field this$0: a.A + inner (anonymous) class a/A$fk$1 + method (p0: a.A): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public class a/A { + // source: 'a.kt' + private @org.jetbrains.annotations.NotNull field vk: java.lang.String + private @org.jetbrains.annotations.NotNull field vo: java.lang.String + inner (anonymous) class a/A$fk$1 + public method (): void + public synthetic final static method access$getVk$p(p0: a.A): java.lang.String + public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void + public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0 + protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String + protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt new file mode 100644 index 00000000000..16aa7439be7 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt @@ -0,0 +1,24 @@ +// FILE: accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt +import a.A + +class B : A() { + fun test() = object { + override fun toString() = vo + fk()() + } +} + +// FILE: a.kt +package a + +open class A { + protected var vo = "O" + private set + + protected var vk = "" + private set + + fun fk() = { -> + vk = "K" + vk + } +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.txt b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.txt new file mode 100644 index 00000000000..e67e79793b5 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.txt @@ -0,0 +1,43 @@ +@kotlin.Metadata +public final class B$test$1 { + // source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt' + enclosing method B.test()Ljava/lang/Object; + synthetic final field this$0: B + inner (anonymous) class B$test$1 + method (p0: B): void + public @org.jetbrains.annotations.NotNull method toString(): java.lang.String +} + +@kotlin.Metadata +public final class B { + // source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt' + inner (anonymous) class B$test$1 + public method (): void + public synthetic final static method access$getVo$p(p0: B): java.lang.String + public final @org.jetbrains.annotations.NotNull method test(): java.lang.Object +} + +@kotlin.Metadata +final class a/A$fk$1 { + // source: 'a.kt' + enclosing method a/A.fk()Lkotlin/jvm/functions/Function0; + synthetic final field this$0: a.A + inner (anonymous) class a/A$fk$1 + method (p0: a.A): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public class a/A { + // source: 'a.kt' + private @org.jetbrains.annotations.NotNull field vk: java.lang.String + private @org.jetbrains.annotations.NotNull field vo: java.lang.String + inner (anonymous) class a/A$fk$1 + public method (): void + public synthetic final static method access$getVk$p(p0: a.A): java.lang.String + public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void + public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0 + protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String + protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral_ir.txt b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral_ir.txt new file mode 100644 index 00000000000..92f48dc3feb --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral_ir.txt @@ -0,0 +1,42 @@ +@kotlin.Metadata +public final class B$test$1 { + // source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt' + enclosing method B.test()Ljava/lang/Object; + synthetic final field this$0: B + inner (anonymous) class B$test$1 + method (p0: B): void + public @org.jetbrains.annotations.NotNull method toString(): java.lang.String +} + +@kotlin.Metadata +public final class B { + // source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt' + inner (anonymous) class B$test$1 + public method (): void + public synthetic final static method access$getVo(p0: B): java.lang.String + public final @org.jetbrains.annotations.NotNull method test(): java.lang.Object +} + +@kotlin.Metadata +final class a/A$fk$1 { + // source: 'a.kt' + enclosing method a/A.fk()Lkotlin/jvm/functions/Function0; + synthetic final field this$0: a.A + inner (anonymous) class a/A$fk$1 + method (p0: a.A): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public class a/A { + // source: 'a.kt' + private @org.jetbrains.annotations.NotNull field vk: java.lang.String + private @org.jetbrains.annotations.NotNull field vo: java.lang.String + inner (anonymous) class a/A$fk$1 + public method (): void + public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void + public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0 + protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String + protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter_ir.txt b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter_ir.txt new file mode 100644 index 00000000000..97bdc7ebd43 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter_ir.txt @@ -0,0 +1,43 @@ +@kotlin.Metadata +final class B$test$1 { + // source: 'accessorForProtectedPropertyWithPrivateSetter.kt' + enclosing method B.test()Lkotlin/jvm/functions/Function0; + synthetic final field this$0: B + inner (anonymous) class B$test$1 + method (p0: B): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public final class B { + // source: 'accessorForProtectedPropertyWithPrivateSetter.kt' + inner (anonymous) class B$test$1 + public method (): void + public synthetic final static method access$getVo(p0: B): java.lang.String + public final @org.jetbrains.annotations.NotNull method test(): kotlin.jvm.functions.Function0 +} + +@kotlin.Metadata +final class a/A$fk$1 { + // source: 'a.kt' + enclosing method a/A.fk()Lkotlin/jvm/functions/Function0; + synthetic final field this$0: a.A + inner (anonymous) class a/A$fk$1 + method (p0: a.A): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public class a/A { + // source: 'a.kt' + private @org.jetbrains.annotations.NotNull field vk: java.lang.String + private @org.jetbrains.annotations.NotNull field vo: java.lang.String + inner (anonymous) class a/A$fk$1 + public method (): void + public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void + public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0 + protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String + protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 84fd1cd47ea..46d78319300 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -22533,6 +22533,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt"); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index e82685ad8f5..680ee0fb00f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -25,6 +25,16 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, true); } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index a92ae04f22a..0421c6cc124 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -14799,11 +14799,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/anySuperCall.kt"); } - @TestMetadata("fieldNameClash.kt") - public void ignoreFieldNameClash() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/fieldNameClash.kt"); - } - @TestMetadata("inlineClassWithCustomEquals.kt") public void ignoreInlineClassWithCustomEquals() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/inlineClassWithCustomEquals.kt"); @@ -15107,6 +15102,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/extLambdaInInlineClassFun2.kt"); } + @TestMetadata("fieldNameClash.kt") + public void testFieldNameClash() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/fieldNameClash.kt"); + } + @TestMetadata("genericInlineClassSynthMembers.kt") public void testGenericInlineClassSynthMembers() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/genericInlineClassSynthMembers.kt"); @@ -22548,6 +22548,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt"); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 5dad749d677..4e6eea7934b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -20762,6 +20762,26 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt"); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index ade820bb21d..8adce5c33bf 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -25,6 +25,16 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 22b63932fde..46ac5cf82a3 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -17108,6 +17108,26 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt"); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index a2040dd8978..642a7e73f3d 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -17108,6 +17108,26 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt"); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 609679edd00..573a1252cde 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -17213,6 +17213,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } + @TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt") + public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt"); + } + + @TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt") + public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception { + runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt"); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); }