Skip to content

🍒 Support required inits in @objcImpl #66862

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

Conversation

beccadax
Copy link
Contributor

  • Explanation: Permits the implementation of required inits, like those required by protocols, in an @_objcImplementation extension, and ensures the required-ness of interfaces and implementations match. This change is necessary to write conformances to protocols like NSCopying.
  • Radar (and possibly SR Issue): rdar://110016760
  • Scope: Affects early adopters of the unfinished @_objcImplementation feature, and is not expected to cause regressions.
  • Risk: Very low. In the 5.9 branch, this change will emit only warnings, not errors.
  • Testing: Includes unit tests.
  • Reviewed By: @tshortli in Support required inits in @objcImpl #66262.

• Allow `required init`s in @objcImpl extensions of a class’s main body
• Validate that the presence or absence of a `required` modifier matches the imported header declaration.

Fixes rdar://110016760.
@beccadax beccadax added the 🍒 release cherry pick Flag: Release branch cherry picks label Jun 22, 2023
@beccadax beccadax requested a review from a team as a code owner June 22, 2023 18:41
@beccadax beccadax requested a review from nkcsgexi June 22, 2023 18:41
@beccadax
Copy link
Contributor Author

@swift-ci please test

@beccadax beccadax changed the title [5.9] Support required inits in @objcImpl 🍒 Support required inits in @objcImpl Jun 22, 2023
@beccadax beccadax merged commit 75a04b0 into swiftlang:release/5.9 Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants