Skip to content

[PrintAsObjC] Reintroduce +new when reintroducing -init. #13320

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

Merged
merged 1 commit into from
Dec 7, 2017

Conversation

jrose-apple
Copy link
Contributor

Follow-up to #12295 to account for subclasses. An unavailable -init makes +new unavailable, but reintroducing it in a subclass should reintroduce +new if the root class is NSObject (where +new is implemented).

rdar://problem/35914080

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@jrose-apple
Copy link
Contributor Author

cc @JaviSoto

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2017

Build failed
Swift Test OS X Platform
Git Sha - ef4883b5c4532e48c6e18d8bee613711c221967e

Follow-up to 49c65fa to account for subclasses. An unavailable
-init makes +new unavailable, but reintroducing it in a subclass
should reintroduce +new if the root class is NSObject (where +new is
implemented).

rdar://problem/35914080
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2017

Build failed
Swift Test OS X Platform
Git Sha - ef4883b5c4532e48c6e18d8bee613711c221967e

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JaviSoto
Copy link
Contributor

JaviSoto commented Dec 7, 2017

Oops I'm sorry! Obvious in hindsight. Thanks for fixing!

@jrose-apple jrose-apple merged commit 2bc0106 into swiftlang:master Dec 7, 2017
@jrose-apple jrose-apple deleted the new-and-improved branch December 7, 2017 23:15
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Dec 7, 2017
…3320)

Follow-up to 49c65fa to account for subclasses. An unavailable
-init makes +new unavailable, but reintroducing it in a subclass
should reintroduce +new if the root class is NSObject (where +new is
implemented).

rdar://problem/35914080
(cherry picked from commit 2bc0106)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants