Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SwiftBindings] Allow C# types to be passed to Swift generic functions with protocol constraints #2856

Open
Tracked by #2824
jkurdek opened this issue Dec 4, 2024 · 0 comments
Labels
area-SwiftBindings Swift bindings for .NET

Comments

@jkurdek
Copy link
Member

jkurdek commented Dec 4, 2024

User should be able to implement a C# type which conforms to a projected Swift Protocol. Then it should be possible to use this type whenever calling swift generic functions who accept a generic argument constrained to the implemented protocol.

The C# type will not have a valid protocol witness table with respect to the Swift protocol, which means that it cannot be directly passed to generic functions/types. We will most likely need some proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-SwiftBindings Swift bindings for .NET
Projects
None yet
Development

No branches or pull requests

1 participant