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 async initializers and properties #1778

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

[swift2objc] Support async initializers and properties #1778

liamappelbe opened this issue Dec 3, 2024 · 0 comments
Labels
good first issue A good starting issue for contributors (issues with this label will appear in /contribute) package:swift2objc

Comments

@liamappelbe
Copy link
Contributor

liamappelbe commented Dec 3, 2024

Working on #1773, I found that async initializers and property getters can't be marked with @objc:

pkgs/swift2objc/test/integration/async_output.swift:36:9: error: 'async' initializer cannot be represented in Objective-C
  @objc init(y: Int) async {
        ^            ~~~~~

pkgs/swift2objc/test/integration/async_output.swift:26:20: error: property with 'throws' or 'async' is not representable in Objective-C
  @objc public var x: MyClassWrapper {
                   ^

Similarly to #1765, the fix is to transform these initializers and properties into a static method.

@liamappelbe liamappelbe moved this to Backlog in ObjC/Swift interop Dec 3, 2024
@liamappelbe liamappelbe added the good first issue A good starting issue for contributors (issues with this label will appear in /contribute) label Dec 3, 2024
@liamappelbe liamappelbe changed the title [swift2objc] Support async initializers [swift2objc] Support async initializers and properties Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good starting issue for contributors (issues with this label will appear in /contribute) package:swift2objc
Projects
Status: Backlog
Development

No branches or pull requests

1 participant