Question regarding Objective-C exported names Hel...
# kotlin-native
n
Question regarding Objective-C exported names Hello, our team uses Kotlin to target iOS as well as android. We’ve noticed that property names (across different type declarations) could be suffixed with 1 or more
_
characters in order to avoid name collisions. This was confirmed by ticket KT-48072 We suspect that this is due to
ObjCExportNamer
performing conflict detection for properties among all known properties exported by our framework. See the following for context, it might be relevant to the issue: - https://github.com/JetBrains/kotlin/blob/4dcfd3823664d765e62b33020623c9487ab56abb/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt#L330 - https://github.com/JetBrains/kotlin/blob/4dcfd3823664d765e62b33020623c9487ab56abb/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt#L587 Is there a reason why property-name conflict resolution checks in all the previous properties (global) instead of being scoped to the current type being exported (local to the type)?
👀 2