swift - Cannot invoke 'filter' with an argument list of type '((_) -> _)' -
sounds ridiculous, i'm unable fix piece of code:
self.runningscripts.filter({ $0 != scriptrunner }) no matter how write closure error:
cannot invoke 'filter' argument list of type '
((_) -> _)'
runningscripts defined this:
var runningscripts = [scriptrunner]() and scriptrunner swift class (does not inherit nsobject)
i'm using same in many other places without problems. suggestions?
you can error if didn't make scriptrunner conform equatable:
class scriptrunner : equatable { // rest of implementation here } func ==(lhs: scriptrunner, rhs: scriptrunner) -> bool { return ... // change whatever test satisfies lhs , rhs equal }
Comments
Post a Comment