All these types extend AnyVal, for which the value cannot be null for its intended purpose, the reason why it turns them to zero in response to asInstanceOf, however, eludes me. This seems to be done only in the REPL, but this is a bit of a special case. In real code, it returns null.
source share