IntelliJ with the "explain types" compiler option enabled emits the following error message:
Warning: scala <:<[Array[Z],Array[Z]] <: Array[Z] => scala.collection.GenTraversableOnce[?]?
Warning:
Warning: scala: false
I suspected that IntelliJ was mangling scalac
output, so I ran the compiler manually with the flag -explaintypes
:
<:<[Array[Z],Array[Z]] <: Array[Z] => scala.collection.GenTraversableOnce[?]?
false
Nothing <: A?
true
A <: AnyRef?
false
a.type <: Array[T]?
false
Nothing <: A?
true
A <: AnyRef?
false
a.type <: Array[T]?
false
NOTE: I've replaced the real type name above with Z
, since it is quite long, and I suspect that it is not relevant.
Sadly, neither message explains much to me. Can someone explain how to interpret these messages, ideally with pointers to documentation? Googling for scalac explaintypes
primarily returns message threads about people complaining that they don't understand the output.