Skip to content

🍒 Diagnose conformances on @objcImpl extensions #66649

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
Jun 15, 2023

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Jun 14, 2023

  • Explanation: @_objcImplementation extensions aren’t allowed to declare new conformances; instead, they should either be declared in the header or in an ordinary extensions. (If they were permitted, they’d be ignored.) Diagnose attempts to do so. In Swift 5.9, these will be warnings to avoid breaking early adopters.
  • Radar: rdar://110669366
  • Scope: Swift projects that have adopted @_objcImplementation and are incorrectly declaring conformances on the extension.
  • Risk: Very low; this only emits warnings, and only for a rare misuse of the feature.
  • Testing: Includes unit tests.
  • Reviewed By: @tshortli and @nkcsgexi in Diagnose conformances on @objcImpl extensions #66609.

@objcImpl extensions aren’t allowed to declare new conformances; instead, they should either be declared in the header or in an ordinary extensions. (If they were permitted, they’d be ignored.)

Fixes rdar://110669366.

# Conflicts:
#	test/decl/ext/objc_implementation.swift
@beccadax beccadax added the 🍒 release cherry pick Flag: Release branch cherry picks label Jun 14, 2023
@beccadax beccadax requested a review from a team as a code owner June 14, 2023 22:20
@beccadax beccadax requested a review from nkcsgexi June 14, 2023 22:23
@beccadax
Copy link
Contributor Author

@swift-ci please test

@beccadax beccadax merged commit 061d92e into swiftlang:release/5.9 Jun 15, 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