sealed abstract
Liskov substitutability: A better <:<
A <: B
holds whenever A
could be used in any negative context that expects a B
.
(e.g. if you could pass an A
into any function that expects a B
.)
- Companion
- object
class Object
trait Matchable
class Any