Skip to content

Allow ObjC superclass to disable init inheritance #61896

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
Nov 7, 2022

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Nov 3, 2022

ObjC classes which have only factory and convenience initializers cannot allow their convenience inits to be inherited. To provide these classes with a reliable opt-out, tweak support for @_hasMissingDesignatedInitializers so that it affects ObjC classes even if they’re in the same module as one another.

Fixes rdar://48511013.

ObjC classes which have only factory and convenience initializers cannot allow their convenience inits to be inherited. To provide these classes with a reliable opt-out, tweak support for @_hasMissingDesignatedInitializers so that it affects ObjC classes even if they’re in the same module as one another.

Fixes rdar://48511013.
@beccadax
Copy link
Contributor Author

beccadax commented Nov 3, 2022

@swift-ci please test

@beccadax beccadax requested a review from CodaFi November 3, 2022 00:15
@beccadax
Copy link
Contributor Author

beccadax commented Nov 3, 2022

@swift-ci please test source compatibility

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

This is a very interesting way to do this.

@beccadax
Copy link
Contributor Author

beccadax commented Nov 7, 2022

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 6a07e0e into main Nov 7, 2022
@swift-ci swift-ci deleted the inits-on-a-milk-carton branch November 7, 2022 23:03
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.

3 participants