Original ObjC/Swift `var`: <https://developer.appl...
# ios
r
Original ObjC/Swift `var`: https://developer.apple.com/documentation/foundation/nsexception/1412165-callstackreturnaddresses Generated Kotlin code:
Copy code
public final val callStackReturnAddresses: kotlin.collections.List<*> /* compiled code */
    @kotlinx.cinterop.ObjCMethod public open external fun callStackReturnAddresses(): kotlin.collections.List<*> { /* compiled code */ }
- Why is the
val
final
? It isn’t in ObjC/Swift - Why is there an open function with the same name? Does overriding it overrides the
val
too? How does that work?
l
I think @svyatoslav.scherbina might be able to answer.
s
- Why is there an open function with the same name? Does overriding it overrides the 
val
 too?
Yes. To override a
val
, you need to override its accessor(s).
callStackReturnAddresses()
is the getter.
👍 1