TypeComparer

object TypeComparer
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

object ApproxState

The approximation state indicates how the pair of types currently compared relates to the types compared originally.

The approximation state indicates how the pair of types currently compared relates to the types compared originally.

  • None : They are still the same types
  • LoApprox: The left type is approximated (i.e widened)"
  • HiApprox: The right type is approximated (i.e narrowed)"

Types

Value members

Concrete methods

def andType(using Context)(tp1: Type, tp2: Type, isErased: Boolean): Type
def approximation(param: TypeParamRef, fromBelow: Boolean)(using Context): Type
def bounds(param: TypeParamRef)(using Context): TypeBounds
def constrainPatternType(pat: Type, scrut: Type, widenParams: Boolean)(using Context): Boolean
def dropTransparentTraits(tp: Type, bound: Type)(using Context): Type
def explained[T](op: ExplainingTypeComparer => T, header: String)(using Context): String
def glb(tp1: Type, tp2: Type)(using Context): Type
def glb(tps: List[Type])(using Context): Type

The greatest lower bound of a list types

The greatest lower bound of a list types

def instanceType(param: TypeParamRef, fromBelow: Boolean)(using Context): Type
def isSameRef(tp1: Type, tp2: Type)(using Context): Boolean
def isSameType(tp1: Type, tp2: Type)(using Context): Boolean
def isSameTypeWhenFrozen(tp1: Type, tp2: Type)(using Context): Boolean
def isSubType(tp1: Type, tp2: Type)(using Context): Boolean
def isSubTypeWhenFrozen(tp1: Type, tp2: Type)(using Context): Boolean
def liftIfHK(tp1: Type, tp2: Type, op: (Type, Type) => Type, original: (Type, Type) => Type, combineVariance: (Variance, Variance) => Variance)(using Context): Type
def lub(tp1: Type, tp2: Type, canConstrain: Boolean)(using Context): Type
final def lub(tps: List[Type])(using Context): Type

The least upper bound of a list of types

The least upper bound of a list of types

def lubArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo], canConstrain: Boolean)(using Context): List[Type]
def matchesType(tp1: Type, tp2: Type, relaxed: Boolean)(using Context): Boolean
def necessarySubType(tp1: Type, tp2: Type)(using Context): Boolean
def orType(using Context)(tp1: Type, tp2: Type, isErased: Boolean): Type
def provablyDisjoint(tp1: Type, tp2: Type)(using Context): Boolean
def testSubType(tp1: Type, tp2: Type)(using Context): CompareResult
def topLevelSubType(tp1: Type, tp2: Type)(using Context): Boolean
def tracked[T](op: TrackingTypeComparer => T)(using Context): T
def widenInferred(inst: Type, bound: Type)(using Context): Type