core-data
core-data copied to clipboard
both operands of "===" should be AnyObject
This eliminates the compiler error. But does it eliminate the root cause? That is, should $0 be Any Object?
~The correct~ A better fix for this would be to change the extension to:
extension Sequence where Element: AnyObject
While the iterator also uses the Element associated type and that one is constrained to be equal to the Sequence's Element type, the type system only checks the Sequence's Element type in this case, so it can't establish that every element of the Sequence is also an AnyObject anyway when only the Iterator's Element is specified.
Hope that makes sense.