In this case there is nothing misleading.
Normally the ==
operator is defined for Equatable
items. That allows two Double
values to be compared to each other, e.g. 1.0 == 1.0
.
Then we have a specific ==
operator defined on Arrays of Equatable
items:
public func ==(lhs: [Element], rhs: [Element]) -> Bool
That means that you can compare any arrays with equatable items. However, the arrays themselves are not Equatable
.
There is no such operator defined for nested arrays.
You would have to define:
public func ==(lhs: [[Element]], rhs: [[Element]]) -> Bool {
...
}