diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index 7e4fb0f0fee..1b531d6a842 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -16862,6 +16862,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 21db1c6efac..c7bef73ed42 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -16862,6 +16862,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt index 16697816cbc..9458a532dda 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt @@ -583,7 +583,7 @@ class Fir2IrConverter( requireNotNull(delegateFieldToPropertyMap) require(parent is IrClass) val correspondingClassProperty = declaration.findCorrespondingDelegateProperty(containingClass) - if (correspondingClassProperty == null) { + if (correspondingClassProperty == null || correspondingClassProperty.isVar) { val irField = declarationStorage.createDelegateIrField(declaration, parent) delegatedMemberGenerator.generateWithBodiesIfNeeded(declaration, irField, containingClass, parent) } else { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index baccaef4f82..9c7ca184dff 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -16803,6 +16803,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index a05c1389596..aea04687568 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -16803,6 +16803,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index c87c2bbb995..751fcd7ffcb 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -16803,6 +16803,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/compiler/testData/codegen/box/delegation/delegationToVar.kt b/compiler/testData/codegen/box/delegation/delegationToVar.kt new file mode 100644 index 00000000000..6d894eac7db --- /dev/null +++ b/compiler/testData/codegen/box/delegation/delegationToVar.kt @@ -0,0 +1,20 @@ +// ISSUE: KT-65920 + +interface I { + fun foo() +} + +class Test2(var j: I) : I by j + +fun box(): String { + var result = "" + + val x = Test2(object : I { override fun foo() { result += "1" }}) + x.foo() + x.j = object : I { override fun foo() { result += "2" }} + x.foo() + return when (result) { + "11" -> "OK" + else -> "Fail: $result" + } +} diff --git a/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.ir.txt b/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.ir.txt index 77738742f3f..d7ecf8a01d3 100644 --- a/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.ir.txt @@ -88,6 +88,9 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt : GET_VAR ': D of .Test1.? declared in .Test1.' type=D of .Test1.? origin=null CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[.IBase] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 + FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:private [final] + EXPRESSION_BODY + GET_VAR 'j: .IBase declared in .Test2.' type=.IBase origin=null PROPERTY name:j visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:j type:.IBase visibility:private EXPRESSION_BODY @@ -122,7 +125,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt BLOCK_BODY CALL 'public abstract fun foo (a: A of .IBase, b: B of .IBase.foo): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : B of .Test2.foo - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:.IBase visibility:private' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:private [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.foo' type=.Test2 origin=null a: GET_VAR 'a: kotlin.String declared in .Test2.foo' type=kotlin.String origin=null b: GET_VAR 'b: B of .Test2.foo declared in .Test2.foo' type=B of .Test2.foo origin=null @@ -153,7 +156,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Map.Test2.>? declared in .Test2' CALL 'public abstract fun (): kotlin.collections.Map.IBase, C of .IBase.>? declared in .IBase' type=kotlin.collections.Map.Test2.>? origin=null : C of .Test2. - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:.IBase visibility:private' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:private [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null $receiver: GET_VAR ': C of .Test2. declared in .Test2.' type=C of .Test2. origin=null PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [var] @@ -170,7 +173,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt RETURN type=kotlin.Nothing from='public open fun (): D of .Test2.? declared in .Test2' CALL 'public abstract fun (): D of .IBase.? declared in .IBase' type=D of .Test2.? origin=null : D of .Test2. - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:.IBase visibility:private' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:private [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null $receiver: GET_VAR ': kotlin.collections.List.Test2.> declared in .Test2.' type=kotlin.collections.List.Test2.> origin=null FUN DELEGATED_MEMBER name: visibility:public modality:OPEN ($this:.Test2, $receiver:kotlin.collections.List.Test2.>, :D of .Test2.?) returnType:kotlin.Unit @@ -184,7 +187,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt BLOCK_BODY CALL 'public abstract fun (: D of .IBase.?): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : D of .Test2. - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:.IBase visibility:private' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:private [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null $receiver: GET_VAR ': kotlin.collections.List.Test2.> declared in .Test2.' type=kotlin.collections.List.Test2.> origin=null : GET_VAR ': D of .Test2.? declared in .Test2.' type=D of .Test2.? origin=null diff --git a/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.kt.txt b/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.kt.txt index 0ba438d2da7..dd8efd615e9 100644 --- a/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.kt.txt @@ -26,6 +26,7 @@ class Test1 : IBase { } class Test2 : IBase { + private /* final field */ val $$delegate_0: IBase = j var j: IBase field = j get @@ -38,20 +39,20 @@ class Test2 : IBase { } override fun foo(a: String, b: B) { - .#j.foo(a = a, b = b) + .#$$delegate_0.foo(a = a, b = b) } override val C.id: Map? override get(): Map? { - return (.#j, ).() + return (.#$$delegate_0, ).() } override var List.x: D? override get(): D? { - return (.#j, ).() + return (.#$$delegate_0, ).() } override set(: D?) { - (.#j, ).( = ) + (.#$$delegate_0, ).( = ) } } diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 6712cb067d9..c5b6bbc800a 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -16803,6 +16803,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { 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 9973dc4f833..17407e70868 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 @@ -16419,6 +16419,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { 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 7154988c6c8..891464a52eb 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 @@ -16803,6 +16803,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 7dc01df57f7..4ac01b6f53b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -16803,6 +16803,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 7e3515a9c24..9ba141725cd 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -13864,6 +13864,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index f7061a63d96..dfd23acb21d 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -12753,6 +12753,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index 1bf291da4b1..d1daba96809 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -12753,6 +12753,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 8121b37f62c..9b1be8cfb3c 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -12753,6 +12753,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index 3c2703709a4..cd9257c6dd3 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -12753,6 +12753,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index bba9234f889..b0425975539 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -13808,6 +13808,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index 760a46458b6..f98cd5ac754 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -14122,6 +14122,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 576e59633a7..fb3d098ada0 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -13494,6 +13494,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index d8edcff17cf..5b441a6d60a 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -13809,6 +13809,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java index 77cc8b556b3..fdd5bf50260 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java @@ -12729,6 +12729,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 397437d3f71..ced66a5a380 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -12729,6 +12729,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); } + @Test + @TestMetadata("delegationToVar.kt") + public void testDelegationToVar() { + runTest("compiler/testData/codegen/box/delegation/delegationToVar.kt"); + } + @Test @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() {