mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When extending a type via a generic typealias, where the type parameters of the underlying nominal type line up precisely with those of the generic typealias and its specialization of the underlying nominal type (a so-called "pass-through" typealias in the new code), maintain type sugar in the extension declaration. This new type sugar enables inference of type requirements from the generic typealias, which is both useful by itself (it lets the type requirements on generic typealiases be meaningful for extensions like they are elsewhere), and also addresses a source-compatability regression where an extension of `CountableRange` will now infer the requirement `Bound: Comparable`. Fixes SR-6907 / rdar://problem/29066394.
14 KiB
14 KiB