ApproximatingTypeMap

abstract
class ApproximatingTypeMap(using x$1: Context) extends TypeMap

A type map that approximates TypeBounds types depending on variance.

if variance > 0 : approximate by upper bound variance < 0 : approximate by lower bound variance = 0 : propagate bounds to next outer level

class TypeMap
trait Type => Type
class Object
trait Matchable
class Any

Value members

Concrete methods

override protected
Definition Classes
override protected
def derivedAndType(tp: AndType, tp1: Type, tp2: Type): Type
Definition Classes
override protected
def derivedAnnotatedType(tp: AnnotatedType, underlying: Type, annot: Annotation): Type
Definition Classes
override protected
def derivedAppliedType(tp: AppliedType, tycon: Type, args: List[Type]): Type
Definition Classes
override protected
Definition Classes
override protected
def derivedLambdaType(tp: LambdaType)(formals: List[PInfo], restpe: Type): Type
Definition Classes
override protected
def derivedMatchType(tp: MatchType, bound: Type, scrutinee: Type, cases: List[Type]): Type
Definition Classes
override protected
def derivedOrType(tp: OrType, tp1: Type, tp2: Type): Type
Definition Classes
override protected
def derivedRecType(tp: RecType, parent: Type): Type
Definition Classes
override protected
def derivedRefinedType(tp: RefinedType, parent: Type, info: Type): Type
Definition Classes
override protected

Derived selection.

Derived selection.

Definition Classes
override protected
Definition Classes
override protected
def derivedSuperType(tp: SuperType, thistp: Type, supertp: Type): Type
Definition Classes
override protected
Definition Classes
override protected
Definition Classes
protected
protected
def expandParam(tp: NamedType, pre: Type): Type

Expand parameter reference corresponding to prefix pre; If the expansion is a wildcard parameter reference, convert its underlying bounds to a range, otherwise return the expansion.

Expand parameter reference corresponding to prefix pre; If the expansion is a wildcard parameter reference, convert its underlying bounds to a range, otherwise return the expansion.

Whether it is currently expanding bounds

Whether it is currently expanding bounds

It is used to avoid following LazyRef in F-Bounds

protected
def isRange(tp: Type): Boolean
protected
def lower(tp: Type): Type
protected
def range(lo: Type, hi: Type): Type
protected
protected
def reapply(tp: Type): Type
def tryWiden(tp: NamedType, pre: Type): Type

Try to widen a named type to its info relative to given prefix pre, where possible. The possible cases are listed inline in the code.

Try to widen a named type to its info relative to given prefix pre, where possible. The possible cases are listed inline in the code.

protected
def upper(tp: Type): Type

Inherited methods

def andThen(f: Type => Type): TypeMap
Inherited from
TypeMap
def andThen[A](g: Type => A): Type => A
Inherited from
Function1
def apply(tp: Type): Type
Inherited from
TypeMap
inline protected
def atVariance[T](v: Int)(op: => T): T
Inherited from
VariantTraversal
def compose[A](g: A => Type): A => Type
Inherited from
Function1
protected
def derivedExprType(tp: ExprType, restpe: Type): Type
Inherited from
TypeMap
protected
Inherited from
TypeMap
protected

Can the prefix of this static reference be omitted if the reference itself can be omitted? Overridden in TypeOps#avoid.

Can the prefix of this static reference be omitted if the reference itself can be omitted? Overridden in TypeOps#avoid.

Inherited from
VariantTraversal
protected
def mapArgs(args: List[Type], tparams: List[ParamInfo]): List[Type]
Inherited from
TypeMap
protected

Can be overridden. By default, only the prefix is mapped.

Can be overridden. By default, only the prefix is mapped.

Inherited from
TypeMap
def mapOver(tree: Tree): Tree
Inherited from
TypeMap
Inherited from
TypeMap
def mapOver(scope: Scope): Scope
Inherited from
TypeMap
def mapOver(syms: List[Symbol]): List[Symbol]
Inherited from
TypeMap
def mapOver(tp: Type): Type

Map this function over given type

Map this function over given type

Inherited from
TypeMap
protected
Inherited from
TypeMap
protected
Inherited from
VariantTraversal
Inherited from
VariantTraversal
override
Definition Classes
Function1 -> Any
Inherited from
Function1

Implicits

Inherited implicits

implicit protected
Inherited from
TypeMap