NamedPartsAccumulator

dotty.tools.dotc.core.Types.NamedPartsAccumulator

Attributes

Graph
Supertypes
trait (List[NamedType], Type) => List[NamedType]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(xs: List[NamedType], tp: Type): List[NamedType]

Applies the body of this function to the arguments.

Applies the body of this function to the arguments.

Attributes

Returns

the result of function application.

Inherited methods

protected def applyToAnnot(x: List[NamedType], annot: Annotation): List[NamedType]

Attributes

Inherited from:
TypeAccumulator
protected def applyToPrefix(x: List[NamedType], tp: NamedType): List[NamedType]

A prefix is never contravariant. Even if say p.A is used in a contravariant context, we cannot assume contravariance for p because p's lower bound might not have a binding for A, since the lower bound could be Nothing. By contrast, covariance does translate to the prefix, since we have that if p <: q then p.A <: q.A, and well-formedness requires that A is a member of p's upper bound. Overridden in OrderingConstraint's ConstraintAwareTraversal, where a more relaxed scheme is used.

A prefix is never contravariant. Even if say p.A is used in a contravariant context, we cannot assume contravariance for p because p's lower bound might not have a binding for A, since the lower bound could be Nothing. By contrast, covariance does translate to the prefix, since we have that if p <: q then p.A <: q.A, and well-formedness requires that A is a member of p's upper bound. Overridden in OrderingConstraint's ConstraintAwareTraversal, where a more relaxed scheme is used.

Attributes

Inherited from:
TypeAccumulator
inline protected def atVariance[T](v: Int)(op: => T): T

Attributes

Inherited from:
VariantTraversal

Creates a curried version of this function.

Creates a curried version of this function.

Attributes

Returns

a function f such that f(x1)(x2) == apply(x1, x2)

Inherited from:
Function2
final def foldOver(x: List[NamedType], ts: List[Type]): List[NamedType]

Attributes

Inherited from:
TypeAccumulator

Attributes

Inherited from:
TypeAccumulator
protected def isStaticPrefix(pre: Type)(using Context): Boolean

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.

Attributes

Inherited from:
VariantTraversal
protected def stopAt: StopAt

Attributes

Inherited from:
VariantTraversal
protected def stopBecauseStaticOrLocal(tp: NamedType)(using Context): Boolean

Attributes

Inherited from:
VariantTraversal
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function2 -> Any
Inherited from:
Function2

Creates a tupled version of this function: instead of 2 arguments, it accepts a single scala.Tuple2 argument.

Creates a tupled version of this function: instead of 2 arguments, it accepts a single scala.Tuple2 argument.

Attributes

Returns

a function f such that f((x1, x2)) == f(Tuple2(x1, x2)) == apply(x1, x2)

Inherited from:
Function2
protected def tyconTypeParams(tp: AppliedType)(using Context): List[ParamInfo]

The type parameters of the constructor of this applied type. Overridden in OrderingConstraint's ConstraintAwareTraversal to take account of instantiations in the constraint that are not yet propagated to the instance types of type variables.

The type parameters of the constructor of this applied type. Overridden in OrderingConstraint's ConstraintAwareTraversal to take account of instantiations in the constraint that are not yet propagated to the instance types of type variables.

Attributes

Inherited from:
VariantTraversal

Concrete fields

val seen: HashSet[Type]

Implicits

Inherited implicits

implicit protected val accCtx: Context

Attributes

Inherited from:
TypeAccumulator