Skip to content

Conversation

@j-hui
Copy link
Contributor

@j-hui j-hui commented Jul 29, 2025

Swift warns users when they conform an imported type to an imported protocol, because such retroactive conformances are prone to producing conflicting conformances in multiple modules.

When a user annotates a class as SWIFT_PRIVATE_FILEID, they are explicitly conveying that extensions in the blessed file are part of the class's private implementation (and thus privy to elevated access), so we should also not treat conformances in that file as retroactive.

This patch fixes that and adds a test case.

rdar://148083096

…EID to be retroactive

Swift warns users when they conform an imported type to an imported
protocol, because such retroactive conformances are prone to producing
conflicting conformances in multiple modules.

When a user annotates a class as SWIFT_PRIVATE_FILEID, they are
explicitly conveying that extensions in the blessed file are part of
the class's private implementation (and thus privy to elevated access),
so we should also not treat conformances in that file as retroactive.

This patch fixes that and adds a test case.

rdar://148083096
@j-hui
Copy link
Contributor Author

j-hui commented Jul 29, 2025

@swift-ci please test

@j-hui
Copy link
Contributor Author

j-hui commented Aug 4, 2025

@swift-ci please test macOS platform

@j-hui j-hui enabled auto-merge August 4, 2025 16:09
@j-hui j-hui merged commit 4d7df08 into main Aug 5, 2025
4 of 5 checks passed
@j-hui j-hui deleted the private-fileid-not-retroactive branch August 5, 2025 00:44
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