Suppose I have a custom type Foo
, and declare typealias Bar = [Foo]
, are the following 2 extension the same?
extension Bar: Comparable {
public static func < (lhs: Self, rhs: Self) -> Bool {
// ...
}
}
extension Array where Element == Foo: Comparable {
public static func < (lhs: Self, rhs: Self) -> Bool {
// ...
}
}
I found this old pitch that seems to indicate that the first extension shouldn't be possible yet. However, Xcode isn't complaining.