Reparenting: third batch of fixes#87056
Merged
kavon merged 3 commits intoswiftlang:mainfrom Feb 7, 2026
Merged
Conversation
We were walking the extensions of protocols in requirement lowering and in getInheritedProtocols to also count the @reparented entries in all extensions. I had already seen some request evaluator cycles triggered by this with objc protocols, and it seems unnessecary as it's actually a benefit to force people to write the inheritance on the protocol itself.
The `@reparented` was missing and a typealias was being synthesized unexpectedly, creating an issue when typechecking the interface later. There's no fundamental reason why typealiases cannot be supported to say the same thing as the same-type requirement, but I think the same-type requirement is always needed to be written on the extension, one way or another. For now I've chosen to only go with an explicitly-written same-type requirement.
The only way to avoid a source break when introducing a reparenting is to allow implied conditional conformance to a @reparentable protocol, as prior code would not have explicitly stated it.
Member
Author
|
@swift-ci smoke test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@reparentable.rdar://169878220