Sounds ridiculous, but I'm unable to fix this piece of code:
self.runningScripts.filter({ $0 != scriptRunner })
No matter how I write the closure I always get this error:
Cannot invoke 'filter' with an argument list of type '
((_) -> _)
'
runningScripts
is defined like this:
var runningScripts = [ScriptRunner]()
and ScriptRunner
is a Swift class (does not inherit from NSObject)
I'm using nearly the same in many other places without problems. Any suggestions?
See Question&Answers more detail:os