Closed conectado closed 1 year ago
Thanks for your first contribution!
Just need to add tests and then we can land this.
Can add an
extern "Swift"
function in hereAnd in here
And then you can add an extern "Swift" function to this codegen test
and this one
In both of the tests you can use the
ExpectedRustTokens::ContainsManyAndDoesNotContainMany
to confirm that we generate code for theextern Swift
function that usessuper::TypeName
Thanks for the review and detailed guidance!
Added the tests :)
Yeah CI is currently failing due to https://github.com/chinedufn/swift-bridge/pull/225#issuecomment-1552361044
Test looks good, I'll land this. Thanks!
Hi! I encounted an issue while working with the crate while using
already_declared
:When generating the rust function wrappers for an extern swift function with an already_declared struct/enum the generated code used a locally defined struct/enum with this patch we add
super
to that function signature.An example of code that was previously not working:
Previously the genrated function would be something like:
now it's
I'm not sure if it fixes all edge cases but it's working for me locally.
Let me know if I there's something to change to get this merged or if I was just not using
already_declared
correctly 😅