diff --git a/compiler/testData/codegen/box/cinterop/kt63049.kt b/compiler/testData/codegen/box/cinterop/kt63049.kt new file mode 100644 index 00000000000..ae17eb40189 --- /dev/null +++ b/compiler/testData/codegen/box/cinterop/kt63049.kt @@ -0,0 +1,23 @@ +// TARGET_BACKEND: NATIVE +// MODULE: cinterop +// FILE: kt63049.def +depends = Foundation +language = Objective-C +--- +@interface WithClassProperty +@end + +// MODULE: main(cinterop) +// FILE: main.kt +@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class, kotlin.experimental.ExperimentalObjCName::class) + +import kt63049.* +import kotlin.test.assertEquals + +class Impl : WithClassProperty() { + companion object : WithClassPropertyMeta() { + fun stringProperty(): String? = "OK" + } +} + +fun box() = Impl.stringProperty() 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 90852a55935..4322fc8e61c 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 @@ -4832,6 +4832,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/cinterop/kt63048.kt"); } + @Test + @TestMetadata("kt63049.kt") + public void testKt63049() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/kt63049.kt"); + } + @Test @TestMetadata("leakMemoryWithRunningThreadUnchecked.kt") public void testLeakMemoryWithRunningThreadUnchecked() throws Exception { 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 d95f72f68c3..ceab8714071 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 @@ -4942,6 +4942,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/cinterop/kt63048.kt"); } + @Test + @TestMetadata("kt63049.kt") + public void testKt63049() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/kt63049.kt"); + } + @Test @TestMetadata("leakMemoryWithRunningThreadUnchecked.kt") public void testLeakMemoryWithRunningThreadUnchecked() throws Exception { 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 3c3dd7c26be..f76f9cf4718 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 @@ -4722,6 +4722,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/cinterop/kt63048.kt"); } + @Test + @TestMetadata("kt63049.kt") + public void testKt63049() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/kt63049.kt"); + } + @Test @TestMetadata("leakMemoryWithRunningThreadUnchecked.kt") public void testLeakMemoryWithRunningThreadUnchecked() throws Exception { 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 2c406815766..3ff9b8e18c6 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 @@ -4833,6 +4833,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/cinterop/kt63048.kt"); } + @Test + @TestMetadata("kt63049.kt") + public void testKt63049() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/kt63049.kt"); + } + @Test @TestMetadata("leakMemoryWithRunningThreadUnchecked.kt") public void testLeakMemoryWithRunningThreadUnchecked() throws Exception {