As you noted, it works with this syntax:
let arrayOfClassB: [ClassA.ClassB] = []
but the syntax []()works if you declare typealias:
typealias InnerClass = ClassA.ClassB
let arrayOfAliasesOfClassB = [InnerClass]()
Thus, I would say that this is a mistake, let arrayOfClassB = [ClassA.ClassB]()should also work without using types.
Update : there is already an open error about this in Apple.
source
share