Commit Graph

3 Commits

Author SHA1 Message Date
Kavon Farvardin f608fc03ef Reparenting: even more feature guarding improvements
The only known condfail scenario is inheriting from
a protocol P that inherits from a reparentable one R.

We already guard P if it mentions R in its inheritance clause.
So older compilers will simply report that "P" is missing in the
interface, which is a better error message than virally guarding
everything mentioning P. It's an ABI break anyway to do that
without introducing a `@reparented` extension, which needs a guard.

In theory, older compilers shouldn't have too much go wrong if they
were to ignore `@reparentable`, though the RequirementMachine and
witness tables will look different.

rdar://174263176
2026-04-08 10:48:40 -07:00
Becca Royal-Gordon 1f008fb0d0 [ModuleInterface] Enable module selectors by default
And update tests to use them.

This commit depends on fixes in swiftlang/swift PRs #86905, #87129, and #87130.

Fixes rdar://169749886.
2026-02-20 00:35:23 -08:00
Kavon Farvardin 58ad64d3f4 Reparenting: fix interface emission
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.
2026-02-06 13:23:22 -08:00