-
Notifications
You must be signed in to change notification settings - Fork 56
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 properties that throw #1765
Comments
I would like to work on this issue, should I work on this issue? |
Sure. PRs are welcome. I think most of the changes for this fix will be in the transformation stage, so a good place to start reading would be |
Oh, btw, this was a follow up bug to #1766, so make sure to sync past that now that it's landed, since it takes care of the parsing side of |
Hi @liamappelbe, I would like to contribute to this issue. If the other contributor is no longer actively working on it, Please let me know if I can proceed. |
@AmrAhmed119 sure, go for it :) |
Hi @liamappelbe, I've created a pull request for this issue, looking forward for your review. |
Getters are allowed to throw in Swift:
Such properties must be read-only (they can't have setters).
Translating these to an
@objc
compatible wrapper looks like this:But this is a compile error because throwing getters aren't allowed to be annotated with
@objc
. The fix is to instead translate throwing getters to ordinary methods.The text was updated successfully, but these errors were encountered: