object
Sub
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
-
def
hashCode(): Int
-
def
is(info: ScopeInfo, ty: RefKind)(implicit linked: Result): Boolean
-
def
is(l: Type, r: Type)(implicit linked: Result): Boolean
-
final
def
isInstanceOf[T0]: Boolean
-
-
def
lub(lty: Type, rty: Type, bound: Option[Type])(implicit linked: Result): Type
-
def
lub(tys: Seq[Type], bound: Option[Type])(implicit linked: Result): Type
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Our subtyping can be described by a following diagram:
Primitive and aggregate types don't participate in subtyping and they have to be explicitly boxed to become compatible with a reference type.
Reference types form a simple lattice with java.lang.Object at the top and null type at the bottom. Subtyping between traits and classes is based on linearization of the all transitive parents, similarly to scalac.
Nothing is the common bottom type between reference and value types. It represents computations that may never complete normally (either loops forever or throws an exception).