Skip to content

Conversation

@madsodgaard
Copy link
Contributor

If you try to wrap a Swift method with a reserved name like init?, then the output would be:

public func `init` Optional(_ string: String) -> JavaMyClass? {

which is invalid.

This fixes it to generate

public func initOptional(_ string: String) -> JavaMyClass? {

instead.

@ktoso ktoso merged commit bf5ca01 into swiftlang:main Dec 4, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants