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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…