From a045a0a81c41cfa25741c80efe02937f51a4e6a5 Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Fri, 24 Mar 2023 15:42:48 +0100 Subject: [PATCH] FIR: use default getter in serializer if fir contains none since we generate the default getter in this case in Fir2IrDeclarationStorage.createIrProperty, so the serialized metadata should follow the same behavior. #KT-57373 fixed --- .../fir/serialization/FirElementSerializer.kt | 20 ++++++++++++++-- ...LightTreeBlackBoxCodegenTestGenerated.java | 6 +++++ .../FirPsiBlackBoxCodegenTestGenerated.java | 6 +++++ .../delegation/delegationDifferentModule2.kt | 24 +++++++++++++++++++ .../codegen/BlackBoxCodegenTestGenerated.java | 6 +++++ .../IrBlackBoxCodegenTestGenerated.java | 6 +++++ ...kBoxCodegenWithIrInlinerTestGenerated.java | 6 +++++ .../LightAnalysisModeTestGenerated.java | 5 ++++ .../js/test/JsCodegenBoxTestGenerated.java | 6 +++++ .../fir/FirJsCodegenBoxTestGenerated.java | 6 +++++ .../test/ir/IrJsCodegenBoxTestGenerated.java | 6 +++++ .../ir/IrJsES6CodegenBoxTestGenerated.java | 6 +++++ .../tests/objcexport/expectedLazy.h | 21 ++++++++++++++++ .../expectedLazyLegacySuspendUnit.h | 21 ++++++++++++++++ .../tests/objcexport/expectedLazyNoGenerics.h | 21 ++++++++++++++++ .../tests/objcexport/kt57373.kt | 14 +++++++++++ .../tests/objcexport/kt57373.swift | 20 ++++++++++++++++ .../FirNativeCodegenBoxTestGenerated.java | 6 +++++ .../FirNativeCodegenBoxTestNoPLGenerated.java | 6 +++++ .../NativeCodegenBoxTestGenerated.java | 6 +++++ .../NativeCodegenBoxTestNoPLGenerated.java | 6 +++++ .../test/IrCodegenBoxWasmTestGenerated.java | 5 ++++ 22 files changed, 227 insertions(+), 2 deletions(-) create mode 100644 compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt create mode 100644 kotlin-native/backend.native/tests/objcexport/kt57373.kt create mode 100644 kotlin-native/backend.native/tests/objcexport/kt57373.swift diff --git a/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt b/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt index 3227ad2f006..63f6e6f29b2 100644 --- a/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt +++ b/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt @@ -18,6 +18,8 @@ import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.comparators.FirCallableDeclarationComparator import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor +import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter +import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter import org.jetbrains.kotlin.fir.declarations.utils.* import org.jetbrains.kotlin.fir.deserialization.projection import org.jetbrains.kotlin.fir.expressions.* @@ -341,7 +343,14 @@ class FirElementSerializer private constructor( false, false, false ) - val getter = property.getter + val getter = property.getter ?: with(property) { + if (origin == FirDeclarationOrigin.Delegated) { + // since we generate the default accessor on fir2ir anyway (Fir2IrDeclarationStorage.createIrProperty), we have to + // serialize it accordingly at least for delegates to fix issues like #KT-57373 + // TODO: rewrite accordingly after fixing #KT-58233 + FirDefaultPropertyGetter(source = null, moduleData, origin, returnTypeRef, visibility, symbol) + } else null + } if (getter != null) { hasGetter = true val accessorFlags = getAccessorFlags(getter, property) @@ -350,7 +359,14 @@ class FirElementSerializer private constructor( } } - val setter = property.setter + val setter = property.setter ?: with(property) { + if (origin == FirDeclarationOrigin.Delegated && isVar) { + // since we generate the default accessor on fir2ir anyway (Fir2IrDeclarationStorage.createIrProperty), we have to + // serialize it accordingly at least for delegates to fix issues like #KT-57373 + // TODO: rewrite accordingly after fixing #KT-58233 + FirDefaultPropertySetter(source = null, moduleData, origin, returnTypeRef, visibility, symbol) + } else null + } if (setter != null) { hasSetter = true val accessorFlags = getAccessorFlags(setter, property) 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 81df5dba1bf..ba70a35d54c 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 @@ -15709,6 +15709,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { 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 f1ee37b7607..ccb45f4b4a7 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 @@ -15709,6 +15709,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { diff --git a/compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt b/compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt new file mode 100644 index 00000000000..fcca854a90d --- /dev/null +++ b/compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt @@ -0,0 +1,24 @@ +// MODULE: lib +// FILE: lib.kt + +interface I { + val bar: Int +} + +class Impl : I { + override val bar: Int = 42 +} + +class D1(foo: I) : I by foo + +// MODULE: main(lib) +// FILE: main.kt + +class D2(foo: I) : I by foo + +fun box() : String { + val c = Impl() + if (D1(c).bar != 42) return "FAIL 1" + if (D2(c).bar != 42) return "FAIL 2" + return "OK" +} 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 bdda60e8214..b7c523dd23f 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 @@ -15373,6 +15373,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() 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 a1fa5b5581f..e0b9e74049e 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 @@ -15709,6 +15709,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { 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 fce048c1894..ff578c43003 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 @@ -15709,6 +15709,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() 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 dc9dfe3ff06..75535208bce 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -12630,6 +12630,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index 405c33836f4..6c2c2a3a610 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -11785,6 +11785,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { 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 28f44235e1f..7e289600733 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 @@ -11881,6 +11881,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { 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 4b780a91301..449ce5a1267 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 @@ -11881,6 +11881,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { 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 f88de20f396..c2bc806eb66 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 @@ -11881,6 +11881,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazy.h b/kotlin-native/backend.native/tests/objcexport/expectedLazy.h index fc2bcfba02c..a3f230fa09a 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazy.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazy.h @@ -1294,6 +1294,27 @@ __attribute__((swift_name("Kt56521Kt"))) @property (class) int32_t initialized __attribute__((swift_name("initialized"))); @end +__attribute__((swift_name("IKt57373"))) +@protocol KtIKt57373 +@required +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("DKt57373"))) +@interface KtDKt57373 : KtBase +- (instancetype)initWithFoo:(id)foo __attribute__((swift_name("init(foo:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("CKt57373"))) +@interface KtCKt57373 : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("LibraryKt"))) @interface KtLibraryKt : KtBase diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h b/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h index f061c52d37d..bc61603836b 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h @@ -1294,6 +1294,27 @@ __attribute__((swift_name("Kt56521Kt"))) @property (class) int32_t initialized __attribute__((swift_name("initialized"))); @end +__attribute__((swift_name("IKt57373"))) +@protocol KtIKt57373 +@required +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("DKt57373"))) +@interface KtDKt57373 : KtBase +- (instancetype)initWithFoo:(id)foo __attribute__((swift_name("init(foo:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("CKt57373"))) +@interface KtCKt57373 : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("LibraryKt"))) @interface KtLibraryKt : KtBase diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h b/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h index 0fc1c66ac87..a96e8bd67bd 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h @@ -1294,6 +1294,27 @@ __attribute__((swift_name("Kt56521Kt"))) @property (class) int32_t initialized __attribute__((swift_name("initialized"))); @end +__attribute__((swift_name("IKt57373"))) +@protocol KtIKt57373 +@required +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("DKt57373"))) +@interface KtDKt57373 : KtBase +- (instancetype)initWithFoo:(id)foo __attribute__((swift_name("init(foo:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("CKt57373"))) +@interface KtCKt57373 : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +@property (readonly) int32_t bar __attribute__((swift_name("bar"))); +@end + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("LibraryKt"))) @interface KtLibraryKt : KtBase diff --git a/kotlin-native/backend.native/tests/objcexport/kt57373.kt b/kotlin-native/backend.native/tests/objcexport/kt57373.kt new file mode 100644 index 00000000000..3f94c790085 --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/kt57373.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +interface IKt57373 { + val bar: Int +} + +class DKt57373(foo: IKt57373) : IKt57373 by foo + +class CKt57373 : IKt57373 { + override val bar: Int = 42 +} diff --git a/kotlin-native/backend.native/tests/objcexport/kt57373.swift b/kotlin-native/backend.native/tests/objcexport/kt57373.swift new file mode 100644 index 00000000000..a0b91f1474a --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/kt57373.swift @@ -0,0 +1,20 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +import Kt + +func testKt57373() throws { + let impl = CKt57373() + let x = DKt57373(foo: impl) + try assertEquals(actual: x.bar, expected: 42) +} + +class Kt57373Tests : SimpleTestProvider { + override init() { + super.init() + + test("testKt57373", testKt57373) + } +} \ No newline at end of file diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index 8e802d6db1d..74fcb6cc1af 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -13138,6 +13138,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index da91e1a38a9..7696f8990dc 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -13436,6 +13436,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 51110ce361e..174cec6a718 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -12989,6 +12989,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 7f3da3995c2..d91868281b7 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -13287,6 +13287,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @Test + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @Test @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java index 6bb2f0650c0..55b2119f1e1 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java @@ -10520,6 +10520,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule.kt"); } + @TestMetadata("delegationDifferentModule2.kt") + public void testDelegationDifferentModule2() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt"); + } + @TestMetadata("delegationToIntersectionType.kt") public void testDelegationToIntersectionType() throws Exception { runTest("compiler/testData/codegen/box/delegation/delegationToIntersectionType.kt");