To use `==` for Arrays, the Element type needs to conform to `Equatable`. Unfortunately `[String]` does not conform to `Equatable`.
Till Swift 2, Swift converted both hand side of `myArray == [["N/A"]]` to `NSArray` and applied `==` (internally calling "isEqual:") to two NSArrays.
So, even in Swift 2, you cannot compare 2D arrays which cannot be converted to `NSArray`:
enum MyEnum {
case A, B
}
func myFunc(array myArray: [[MyEnum]]) -> String
{
if (myArray == [[MyEnum.A]] || myArray == [[MyEnum.B]]) // THIS IS NOT WORKING
{
//...
}
//...
}
But such implicit type conversions are removed from Swift 3.
As a quick workaround, you can explicitly convert the arrays to `NSArray`:
func myFunc(array myArray: [[String]]) -> String
{
if (myArray as NSArray == [["N/A"]] || myArray as NSArray == [[""]])
{
//...
}
//...
}