You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sema: Source compatibility fix for extensions of type aliases
Referring to a generic type without arguments inside the definition
of the type itself or an extension thereof is a shorthand for
forwarding the arguments from context:
struct Generic<T> {}
extension Generic {
func makeOne() -> Generic // same as -> Generic<T>
}
However this didn't work if the type was replaced by a typealias:
struct OldGeneric<T> {}
typealias Generic<T> = OldGeneric<T>
extension Generic {
func makeOne() -> OldGeneric // OK
func makeOne() -> Generic // error
}
Add a hack for making this work so that we better cope with the
renaming of DictionaryLiteral to KeyValuePairs in Swift 5.0.
Fixes <rdar://problem/43955962>.
0 commit comments