diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index ad92408fa58..23eba7964b2 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -41421,6 +41421,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt44855.kt") + public void testKt44855() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt"); + } + + @Test + @TestMetadata("kt44855a.kt") + public void testKt44855a() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt"); + } + @Test @TestMetadata("kt46578_anonObject.kt") public void testKt46578_anonObject() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java index 620a0e9cb58..3557904c759 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java @@ -2484,6 +2484,12 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { runTest("compiler/testData/ir/irText/regressions/kt24114.kt"); } + @Test + @TestMetadata("kt44855.kt") + public void testKt44855() throws Exception { + runTest("compiler/testData/ir/irText/regressions/kt44855.kt"); + } + @Test @TestMetadata("kt45236.kt") public void testKt45236() throws Exception { diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt index 3b34466607b..c1f94c47d38 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/CallGenerator.kt @@ -88,19 +88,23 @@ class CallGenerator(statementGenerator: StatementGenerator) : StatementGenerator descriptor: DeclarationDescriptor, resolvedCall: ResolvedCall<*>?, origin: IrStatementOrigin?, - irType: IrType? = null + smartCastIrType: IrType? = null ): IrExpression = when (descriptor) { is FakeCallableDescriptorForObject -> - generateValueReference(startOffset, endOffset, descriptor.getReferencedDescriptor(), resolvedCall, origin, irType) + generateValueReference(startOffset, endOffset, descriptor.getReferencedDescriptor(), resolvedCall, origin, smartCastIrType) is TypeAliasDescriptor -> - generateValueReference(startOffset, endOffset, descriptor.classDescriptor!!, null, origin, irType) + generateValueReference(startOffset, endOffset, descriptor.classDescriptor!!, null, origin, smartCastIrType) is ClassDescriptor -> { val classValueType = descriptor.classValueType!! statementGenerator.generateSingletonReference(descriptor, startOffset, endOffset, classValueType) } is PropertyDescriptor -> { - generateCall(startOffset, endOffset, statementGenerator.pregenerateCall(resolvedCall!!)) + val irCall = generateCall(startOffset, endOffset, statementGenerator.pregenerateCall(resolvedCall!!)) + if (smartCastIrType != null) + IrTypeOperatorCallImpl(startOffset, endOffset, smartCastIrType, IrTypeOperator.IMPLICIT_CAST, smartCastIrType, irCall) + else + irCall } is SyntheticFieldDescriptor -> { val receiver = statementGenerator.generateBackingFieldReceiver(startOffset, endOffset, resolvedCall, descriptor) @@ -109,7 +113,7 @@ class CallGenerator(statementGenerator: StatementGenerator) : StatementGenerator IrGetFieldImpl(startOffset, endOffset, field, fieldType, receiver?.load()) } is VariableDescriptor -> - generateGetVariable(startOffset, endOffset, descriptor, getTypeArguments(resolvedCall), origin, irType) + generateGetVariable(startOffset, endOffset, descriptor, getTypeArguments(resolvedCall), origin, smartCastIrType) else -> TODO("Unexpected callable descriptor: $descriptor ${descriptor::class.java.simpleName}") } diff --git a/compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt b/compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt new file mode 100644 index 00000000000..2b410d999b8 --- /dev/null +++ b/compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt @@ -0,0 +1,38 @@ +// IGNORE_BACKEND: JVM +// TARGET_BACKEND: JVM + +// MODULE: lib +// FILE: test/Parent.java + +package test; + +public class Parent { + protected String qqq = ""; + + public String getQqq() { + return qqq; + } +} + +// MODULE: main(lib) +// FILE: kt44855.kt + +import test.Parent + +open class Child(val x: Parent?) : Parent() { + inner class QQQ { + fun z() { + x as Child + val q = x.qqq + x.qqq = q + "OK" + } + } +} + +fun box(): String { + val cc = Child(null) + val c = Child(cc) + val d = c.QQQ() + d.z() + return cc.qqq +} diff --git a/compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt b/compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt new file mode 100644 index 00000000000..8370900f23e --- /dev/null +++ b/compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt @@ -0,0 +1,41 @@ +// TARGET_BACKEND: JVM + +// MODULE: lib +// FILE: test/Parent.java + +package test; + +public class Parent { + private String qqq = ""; + + protected void setQqq(String q) { + this.qqq = q; + } + + public String getQqq() { + return qqq; + } +} + +// MODULE: main(lib) +// FILE: kt44855.kt + +import test.Parent + +open class Child(val x: Parent?) : Parent() { + inner class QQQ { + fun z() { + x as Child + val q = x.qqq + x.qqq = q + "OK" + } + } +} + +fun box(): String { + val cc = Child(null) + val c = Child(cc) + val d = c.QQQ() + d.z() + return cc.qqq +} diff --git a/compiler/testData/ir/irText/regressions/kt44855.fir.txt b/compiler/testData/ir/irText/regressions/kt44855.fir.txt new file mode 100644 index 00000000000..82f0528fe5d --- /dev/null +++ b/compiler/testData/ir/irText/regressions/kt44855.fir.txt @@ -0,0 +1,75 @@ +FILE fqName: fileName:/kt44855.kt + CLASS CLASS name:Child modality:OPEN visibility:public superTypes:[.Parent] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Child + CONSTRUCTOR visibility:public <> (x:.Parent?) returnType:.Child [primary] + VALUE_PARAMETER name:x index:0 type:.Parent? + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Parent' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Child modality:OPEN visibility:public superTypes:[.Parent]' + PROPERTY name:x visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:x type:.Parent? visibility:private [final] + EXPRESSION_BODY + GET_VAR 'x: .Parent? declared in .Child.' type=.Parent? origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Child) returnType:.Parent? + correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.Child + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Parent? declared in .Child' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:.Parent? visibility:private [final]' type=.Parent? origin=null + receiver: GET_VAR ': .Child declared in .Child.' type=.Child origin=null + CLASS CLASS name:QQQ modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Child.QQQ + CONSTRUCTOR visibility:public <> ($this:.Child) returnType:.Child.QQQ [primary] + $outer: VALUE_PARAMETER name: type:.Child + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:QQQ modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' + FUN name:z visibility:public modality:FINAL <> ($this:.Child.QQQ) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Child.QQQ + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=.Child origin=CAST typeOperand=.Child + CALL 'public final fun (): .Parent? declared in .Child' type=.Parent? origin=GET_PROPERTY + $this: GET_VAR ': .Child declared in .Child' type=.Child origin=null + VAR name:q type:@[FlexibleNullability] kotlin.String? [val] + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:qqq type:@[FlexibleNullability] kotlin.String? visibility:protected/*protected and package*/' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY + receiver: TYPE_OP type=.Child origin=IMPLICIT_CAST typeOperand=.Child + CALL 'public final fun (): .Parent? declared in .Child' type=.Parent? origin=GET_PROPERTY + $this: GET_VAR ': .Child declared in .Child' type=.Child origin=null + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:qqq type:@[FlexibleNullability] kotlin.String? visibility:protected/*protected and package*/' type=kotlin.Unit origin=EQ + receiver: TYPE_OP type=.Child origin=IMPLICIT_CAST typeOperand=.Child + CALL 'public final fun (): .Parent? declared in .Child' type=.Parent? origin=GET_PROPERTY + $this: GET_VAR ': .Child declared in .Child' type=.Child origin=null + value: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS + $this: GET_VAR 'val q: @[FlexibleNullability] kotlin.String? [val] declared in .Child.QQQ.z' type=@[FlexibleNullability] kotlin.String? origin=null + other: CONST String type=kotlin.String value="OK" + 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:getQqq visibility:public modality:OPEN <> ($this:.Parent) returnType:@[FlexibleNullability] kotlin.String? [fake_override] + overridden: + public open fun getQqq (): @[FlexibleNullability] kotlin.String? declared in .Parent + $this: VALUE_PARAMETER name: type:.Parent + 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 [fake_override,operator] declared in .Parent + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in .Parent + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in .Parent + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/regressions/kt44855.kt b/compiler/testData/ir/irText/regressions/kt44855.kt new file mode 100644 index 00000000000..58124495ce8 --- /dev/null +++ b/compiler/testData/ir/irText/regressions/kt44855.kt @@ -0,0 +1,22 @@ +// TARGET_BACKEND: JVM +// SKIP_KT_DUMP + +// FILE: kt44855.kt +open class Child(val x: Parent?) : Parent() { + inner class QQQ { + fun z() { + x as Child + val q = x.qqq + x.qqq = q + "OK" + } + } +} + +// FILE: Parent.java +public class Parent { + protected String qqq = ""; + + public String getQqq() { + return qqq; + } +} diff --git a/compiler/testData/ir/irText/regressions/kt44855.txt b/compiler/testData/ir/irText/regressions/kt44855.txt new file mode 100644 index 00000000000..ad8378c731e --- /dev/null +++ b/compiler/testData/ir/irText/regressions/kt44855.txt @@ -0,0 +1,79 @@ +FILE fqName: fileName:/kt44855.kt + CLASS CLASS name:Child modality:OPEN visibility:public superTypes:[.Parent] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Child + CONSTRUCTOR visibility:public <> (x:.Parent?) returnType:.Child [primary] + VALUE_PARAMETER name:x index:0 type:.Parent? + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Parent' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Child modality:OPEN visibility:public superTypes:[.Parent]' + PROPERTY name:x visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:x type:.Parent? visibility:private [final] + EXPRESSION_BODY + GET_VAR 'x: .Parent? declared in .Child.' type=.Parent? origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Child) returnType:.Parent? + correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.Child + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Parent? declared in .Child' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:.Parent? visibility:private [final]' type=.Parent? origin=null + receiver: GET_VAR ': .Child declared in .Child.' type=.Child origin=null + CLASS CLASS name:QQQ modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Child.QQQ + CONSTRUCTOR visibility:public <> ($this:.Child) returnType:.Child.QQQ [primary] + $outer: VALUE_PARAMETER name: type:.Child + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:QQQ modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' + FUN name:z visibility:public modality:FINAL <> ($this:.Child.QQQ) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Child.QQQ + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=.Child origin=CAST typeOperand=.Child + CALL 'public final fun (): .Parent? declared in .Child' type=.Parent? origin=GET_PROPERTY + $this: GET_VAR ': .Child declared in .Child' type=.Child origin=null + VAR name:q type:@[FlexibleNullability] kotlin.String? [val] + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:qqq type:@[FlexibleNullability] kotlin.String? visibility:protected/*protected and package*/' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY + receiver: TYPE_OP type=.Child origin=IMPLICIT_CAST typeOperand=.Child + CALL 'public final fun (): .Parent? declared in .Child' type=.Parent? origin=GET_PROPERTY + $this: GET_VAR ': .Child declared in .Child' type=.Child origin=null + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:qqq type:@[FlexibleNullability] kotlin.String? visibility:protected/*protected and package*/' type=kotlin.Unit origin=EQ + receiver: TYPE_OP type=.Child origin=IMPLICIT_CAST typeOperand=.Child + CALL 'public final fun (): .Parent? declared in .Child' type=.Parent? origin=GET_PROPERTY + $this: GET_VAR ': .Child declared in .Child' type=.Child origin=null + value: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS + $this: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String + GET_VAR 'val q: @[FlexibleNullability] kotlin.String? [val] declared in .Child.QQQ.z' type=@[FlexibleNullability] kotlin.String? origin=null + other: CONST String type=kotlin.String value="OK" + 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + PROPERTY FAKE_OVERRIDE name:qqq visibility:protected/*protected and package*/ modality:FINAL [fake_override,var] + overridden: + protected/*protected and package*/ final qqq: @[FlexibleNullability] kotlin.String? [var] + 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 [fake_override,operator] declared in .Parent + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:getQqq visibility:public modality:OPEN <> ($this:.Parent) returnType:@[FlexibleNullability] kotlin.String? [fake_override] + overridden: + public open fun getQqq (): @[FlexibleNullability] kotlin.String? declared in .Parent + $this: VALUE_PARAMETER name: type:.Parent + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in .Parent + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in .Parent + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 11f8e23e36b..f9e89f1ce52 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -41319,6 +41319,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("kt44855.kt") + public void testKt44855() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt"); + } + + @Test + @TestMetadata("kt44855a.kt") + public void testKt44855a() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt"); + } + @Test @TestMetadata("kt46578_anonObject.kt") public void testKt46578_anonObject() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index f8cc37b6c79..ce48292e426 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -41421,6 +41421,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt44855.kt") + public void testKt44855() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt"); + } + + @Test + @TestMetadata("kt44855a.kt") + public void testKt44855a() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt"); + } + @Test @TestMetadata("kt46578_anonObject.kt") public void testKt46578_anonObject() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java index daaba4b5d4d..93ca3a9e445 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java @@ -2484,6 +2484,12 @@ public class IrTextTestGenerated extends AbstractIrTextTest { runTest("compiler/testData/ir/irText/regressions/kt24114.kt"); } + @Test + @TestMetadata("kt44855.kt") + public void testKt44855() throws Exception { + runTest("compiler/testData/ir/irText/regressions/kt44855.kt"); + } + @Test @TestMetadata("kt45236.kt") public void testKt45236() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 54fbe76e42b..fa32b67ef30 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -33200,6 +33200,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedJavaFieldAccessor extends AbstractLightAnalysisModeTest { + @TestMetadata("kt44855.kt") + public void ignoreKt44855() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -33208,6 +33213,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("kt44855a.kt") + public void testKt44855a() throws Exception { + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt44855a.kt"); + } + @TestMetadata("kt46578_anonObject.kt") public void testKt46578_anonObject() throws Exception { runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_anonObject.kt");