I have the following class:
import UIKit
class SomeClass: Equatable {
var Obj: Any
init(Obj:Any) {
self.Obj = Obj
}
static func == (lhs: SomeClass, rhs: SomeClass) -> Bool {
return lhs.Obj == rhs.Obj
}
}
But I'm getting the following error:
Binary operator '==' cannot be applied to two 'Any' operands
On this line:
return lhs.Obj == rhs.Obj
Any of you knows why I'm getting this error? or if there is a way around this?
I'll really appreciate your help.