Given a contravariant type constructor F[-_]
, if B <: A
, then
F[A] <: F[B]
.
Given a contravariant type constructor F[-_]
, if B <: A
, then
F[A] <: F[B]
.
Given a covariant type constructor F[+_]
, if A <: B
, then
F[A] <: F[B]
.
Given a covariant type constructor F[+_]
, if A <: B
, then
F[A] <: F[B]
.
Int <: Double
, because that's true in Scala.js.
If A <: B1
, then A <: B1 | B2
.
If A <: B2
, then A <: B1 | B2
.
If A <: B2
, then A <: B1 | B2
.
If A <: B
, then A <: js.UndefOr[B]
.