[K/N][tests] Added a reproducer for #KT-65527
diff --git a/native/native.tests/testData/framework/kt65527/kt65527.kt b/native/native.tests/testData/framework/kt65527/kt65527.kt
new file mode 100644
index 0000000..0feaf41
--- /dev/null
+++ b/native/native.tests/testData/framework/kt65527/kt65527.kt
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2010-2024 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 IKt65527<T> {
+ val prop: T
+}
+
+class CKt65527: IKt65527<Boolean> {
+ private var _prop = true
+
+ override var prop: Boolean
+ get() = _prop
+ set(value) {
+ println("new value: $value")
+ _prop = value
+ }
+}
diff --git a/native/native.tests/testData/framework/kt65527/kt65527.swift b/native/native.tests/testData/framework/kt65527/kt65527.swift
new file mode 100644
index 0000000..c6db019
--- /dev/null
+++ b/native/native.tests/testData/framework/kt65527/kt65527.swift
@@ -0,0 +1,20 @@
+import Foundation
+import Kt65527
+
+func testKt65527() throws {
+ let c = CKt65527()
+ try assertTrue(c.prop.boolValue)
+ c.prop = false
+ try assertFalse(c.prop.boolValue)
+}
+
+class Kt65527Tests : TestProvider {
+ var tests: [TestCase] = []
+
+ init() {
+ providers.append(self)
+ tests = [
+ TestCase(name: "Kt65527", method: withAutorelease(testKt65527)),
+ ]
+ }
+}
\ No newline at end of file
diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/FrameworkTest.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/FrameworkTest.kt
index cd4b38a..61c84ce 100644
--- a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/FrameworkTest.kt
+++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/FrameworkTest.kt
@@ -270,6 +270,13 @@
}
@Test
+ fun testKT65527() {
+ val testName = "kt65527"
+ val testCase = generateObjCFramework(testName)
+ compileAndRunSwift(testName, testCase)
+ }
+
+ @Test
fun testPermanentObjects() {
val testName = "permanentObjects"
Assumptions.assumeFalse(testRunSettings.get<GCType>() == GCType.NOOP) { "Test requires GC to actually happen" }