TypeComparer

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

Attributes

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

Members list

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

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type ApproxState = Repr
type CoveredStatus = Repr

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 bounds(param: TypeParamRef)(using Context): TypeBounds
def constValue(tp: Type)(using Context): Option[Constant]
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, short: Boolean)(using Context): String
def fullLowerBound(param: TypeParamRef)(using Context): Type
def fullUpperBound(param: TypeParamRef)(using Context): Type
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 subCaptures(refs1: CaptureSet, refs2: CaptureSet, frozen: Boolean)(using Context): CompareResult
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