TypeComparer

dotty.tools.dotc.core.TypeComparer$
See theTypeComparer companion class

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

opaque 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)"

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait Enum
trait Product
trait Equals
class Object
trait Matchable
class Any

Types

Value members

Concrete methods

def andType(using Context)(tp1: Type, tp2: Type, isErased: Boolean): Type
def approximation(param: TypeParamRef, fromBelow: Boolean, maxLevel: Int)(using Context): Type
def constrainPatternType(pat: Type, scrut: Type, forceInvariantRefinement: 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

Attributes

def hasMatchingMember(name: Name, tp1: Type, tp2: RefinedType)(using Context): Boolean
def instanceType(param: TypeParamRef, fromBelow: Boolean, widenUnions: Boolean, maxLevel: Int)(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, isSoft: 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

Attributes

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, isSoft: Boolean, 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, widenUnions: Boolean)(using Context): Type