Skip to content

Conversation

@ktoso
Copy link
Collaborator

@ktoso ktoso commented Nov 12, 2025

Now that we support generics, we need to do special handling for -> T upcalls... since the T would be replaced with a real type with Swift, which then messes up the function signature we're looking for in the JVM.

This works towards adjusting the @JavaMethod macro and then we have to adjust wrap-java to make use of that to "enable type erasure" when doing these calls.

This is some first steps, hardcoding the Optional::get() and i'll adjust the generator next

@ktoso
Copy link
Collaborator Author

ktoso commented Nov 12, 2025

resolves #439

@ktoso ktoso force-pushed the wip-generic-javakit-methods branch from 37deee3 to 33ed99e Compare November 12, 2025 12:03
@ktoso ktoso changed the title Work on generic Optional::get() JavaMethod's need to handle type erasure; Enable Optional::get() -> T Nov 12, 2025
@ktoso ktoso force-pushed the wip-generic-javakit-methods branch from 57c6c97 to c440a8d Compare November 13, 2025 14:47
@ktoso ktoso merged commit 78311ba into swiftlang:main Nov 13, 2025
95 of 96 checks passed
@ktoso ktoso deleted the wip-generic-javakit-methods branch November 13, 2025 15:31
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.

1 participant