-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Typechecker] Allow @objc functions to return dynamic self #22006
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
Conversation
cc @jrose-apple I am not sure if I should add a protocol restriction as well or just freely allow dynamic self as return type. |
This seems correct to me, but it's worth adding a PrintAsObjC test too to make sure it gets printed as |
This change makes sense to me since we already import |
@jrose-apple @slavapestov I have added a test file, does it look good to you? |
Great, looks like everything works. :-) @swift-ci Please test |
Build failed |
Build failed |
Whoops, there's a crash when running the new test file: @jrose-apple do you know what could be the issue here? |
Ah, sorry. Sorry for not catching that in the review. |
@jrose-apple oh, it's alright! I have updated the test file. Can you take a look and invoke the CI again if it looks good to you? |
@swift-ci Please test |
Build failed |
Build failed |
All tests have passed 🎉 @jrose-apple |
Thank you for the implementation! |
This PR lifts a restriction on @objc functions which disallowed dynamic self as return type.
Resolves SR-7601.