The question isn't about how to test an array for emptiness (arr.length == 0
does this fine). Rather my question is, why does
scala> Array().isEmpty
res1: Boolean = true
work and
scala> val x = Array[String]()
x: Array[String] = Array()
scala> x.isEmpty
res2: Boolean = true
work, but
scala> val y = Array()
y: Array[Nothing] = Array()
scala> y.isEmpty
<console>:13: error: value isEmpty is not a member of Array[Nothing]
y.isEmpty
^
does not?