Skip to content

Sema: allow applying @objc @implementation on extensions to internally imported types - #90133

Draft
nkcsgexi wants to merge 1 commit into
swiftlang:mainfrom
nkcsgexi:178750930
Draft

Sema: allow applying @objc @implementation on extensions to internally imported types#90133
nkcsgexi wants to merge 1 commit into
swiftlang:mainfrom
nkcsgexi:178750930

Conversation

@nkcsgexi

Copy link
Copy Markdown
Contributor

Extend the existing @c/@objc @implementation hidden-dependency exemption to cover the extension's extended-type and where-clause checks

rdar://178750930

…y imported types

Extend the existing @c/@objc @implementation hidden-dependency
exemption to cover the extension's extended-type and where-clause checks

rdar://178750930
@nkcsgexi
nkcsgexi requested a review from beccadax June 23, 2026 17:33
@nkcsgexi
nkcsgexi requested a review from tshortli as a code owner June 23, 2026 17:33
@nkcsgexi

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

@tshortli

tshortli commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This looks generally reasonable, but I think it's missing some test coverage for like adding protocol conformances to the extension. What happens if you, for instance, add some public Swift-only conformance like CustomStringConvertible to @objc @implementation extension ObjCImplClass? Would the compiler try to print that conformance in the .swiftinterface for the module? If so, we can't allow that reference which I think this change would.

@nkcsgexi

Copy link
Copy Markdown
Contributor Author

Great catch! Let me add more test coverage and ensure this new exception doesn't regress textual interface validity.

@nkcsgexi
nkcsgexi marked this pull request as draft June 24, 2026 15:19
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.

2 participants