I was surprised to see these results. Why is Nothing not assignable from Number? and also Number not assignable from Nothing ?
Is this a special case because Nothing is not assignable?
I’m a bit surprised this (scala.runtime.Nothing$) even exists! Anyone know what it’s for?
In any case, as Luis indicates, Nothing being a bottom type is a fact about the Scala type system that there’s no possibility of tricking Java reflection into understanding.
Ah, “If such type appears in method signatures, it is erased to this one”, that makes sense, every type must erase to something. (And erasing to Object instead would allow invalid calls from Java code.)