I created this test case with 2 types and as expected the 'Int' case works. The Callback one doesn't. Not sure why this is happening. I've been trying lots of things. I may be missing something obvious?
typealias Type1 = Int
typealias Type2 = ([AnyObject?]) -> Void
class Test {
private var cb1: [Type1]
private var cb2: [Type2]
init() {
cb1 = [Type1](count: 2, repeatedValue: 0)
cb2 = [Type2](count: 2, repeatedValue: { _ in })
}
func removeAtIndex(index: Int) {
cb1.removeAtIndex(index)
cb2.removeAtIndex(index)
}
}
Resolving to an unused function
is trying to tell you that you have an expression that is returning a function type, but you never call itSo,you just need try to use it