Skip to content

Conversation

@taiyrbegeyev
Copy link

@taiyrbegeyev taiyrbegeyev commented Dec 7, 2025

KT-78532

Introduce @ObjCExportIgnoreNameCollision annotation to suppress name collision errors when generating Objective-C headers with -Xbinary=objcExportErrorOnNameCollisions=true compiler option.

Appendable and StringBuilder have multiple overloaded methods with different parameter types (append(Int), append(String), etc.) that cause mandatory name mangling in ObjC. This prevents users from enabling strict collision checking even when these types only appear in their API signatures without being used from ObjC.

Apply the annotation to Appendable and StringBuilder to allow these stdlib classes to work with the strict collision mode.

Introduce @ObjCExportIgnoreNameCollision annotation to suppress name collision errors when generating Objective-C headers with -Xbinary=objcExportErrorOnNameCollisions=true compiler option.

^KT-78532 Fixed
@taiyrbegeyev
Copy link
Author

@sbogolepov I've implemented this as a general annotation users can apply. Is this the intended scope, or should it be restricted to stdlib symbols only?

@taiyrbegeyev taiyrbegeyev changed the title Fix Appendable/StringBuilder objcExportErrorOnNameCollisions errors Fix KT-78532 Appendable/StringBuilder objcExportErrorOnNameCollisions errors Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants