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

[swift2objc] Support tuples #1783

Open
liamappelbe opened this issue Dec 5, 2024 · 0 comments
Open

[swift2objc] Support tuples #1783

liamappelbe opened this issue Dec 5, 2024 · 0 comments

Comments

@liamappelbe
Copy link
Contributor

Like Dart records, Swift tuples can have positional and named elements. The main difference is that to access the first element of a Dart record you write foo.$1, whereas in Swift you write foo.0.

Tuples are easy enough to parse, but they're not supported in @objc annotated APIs. So we'll need to transform them into classes.

(Int, String, abc: MyClass)

// Would be transformed to something like:

public class Tuple_Int_String_abc_MyClass {
    public let _0: Int
    public let _1: String
    public let abc: MyClassWrapper
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant