我刚刚更新到 Xcode 11.4。我收到以下错误:
Overridden method 'equals' has generic signature <T where T : Gradient> which is incompatible with base method's generic signature <T where T : Fill>; expected generic signature to be <T where T : Fill>
class Fill: Equatable {
func equals<T>(other: T) -> Bool where T: Fill { }
}
func ==<T> (lhs: T, rhs: T) -> Bool where T: Fill {
return lhs.equals(other: rhs)
}
class Gradient: Fill {
override func equals<T>(other: T) -> Bool where T: Gradient { }
}
这是如何改变的?