leastUpperBound abstract method

DartType leastUpperBound(
  1. DartType leftType,
  2. DartType rightType
)

Compute the least upper bound of two types. This operation if commutative, meaning that leastUpperBound(t, s) == leastUpperBound(s, t) for all t and s.

For the Dart 2.0 type system, the definition of the least upper bound is given in the Dart Language Specification, section 19.9.2 Least Upper Bounds.

Other type systems may define this operation differently.

Implementation

DartType leastUpperBound(DartType leftType, DartType rightType);