|
|
Scala 2.3.3
|
final abstract class
Nothing
extends scala.Any
Class Nothing (previously named All in
Scala 2.2.0 and
older versions) is - together with class
Null - at the bottom of the
Scala type
hierarchy.
Type Nothing is a subtype of every other type
(including Null); there
exist no instances of this type. Even though type
Nothing is empty, it is nevertheless useful as a
type parameter. For instance, the Scala library defines a value
Nil of type
List[Nothing]. Because lists
are covariant in Scala,
this makes Nil an
instance of List[T], for
any element type T.