Sounds like subclasses of NSObject are automatical...
# kotlin-native
a
Sounds like subclasses of NSObject are automatically frozen:
Copy code
class TestNsObj: NSObject() {
    init {
        println("is frozen: $isFrozen")
    }
}

fun runTest() {
    val a = TestNsObj()
}
output: is frozen: true Couldn't find any official info about that. Do I miss smth? Btw if I remove subclassing from NSObject the object is not frozen.
a
Probably, this is a bug. I reproduced this behaviour with Kotlin 1.3.72 and 1.4-M1, but in more recent versions including 1.4.0-RC one it outputs
is frozen: false
. I got to share it with the dev team to make sure it was fixed intentionally, or something is missing here.
a
Got it. Yep, it's 1.3.72.