Hey everyone ! Am I the only one to have collision...
# ios
a
Hey everyone ! Am I the only one to have collision naming issues when generating obj-c headers ? If I have two interfaces with a same property but of different type, the compiler will add an
_
at the end of one of them in the header.
Copy code
interface A {
    val foo: Int
}
interface B {
    val foo: Int?
}
I will have the following header:
Copy code
__attribute__((swift_name("A")))
@protocol A
@required
@property (readonly) int32_t foo __attribute__((swift_name("foo"))); // <----- foo: OK
@end;

__attribute__((swift_name("B")))
@protocol B
@required
@property (readonly) KotlinInt * _Nullable foo_ __attribute__((swift_name("foo_"))); // <----- foo with an underscore: NOK
@end;
I didn't find any issue on https://youtrack.jetbrains.com/ So I ask to you here before opening one. _P.S: if props have the same type, there is no collision and no `_`_ added.
b
a
Oh thx! I saw the linked issue you already report on github. Sad we didn't have the possibility to be able to block this mangling. something like the JsName annotation for Objc would have been great