dotty.tools.dotc.core

TypeApplications

Related Docs: class TypeApplications | package core

object TypeApplications

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TypeApplications
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class Reducer extends TypeMap

    A type map that tries to reduce (part of) the result type of the type lambda tycon with the given args(some of which are wildcard arguments represented by type bounds).

    A type map that tries to reduce (part of) the result type of the type lambda tycon with the given args(some of which are wildcard arguments represented by type bounds). Non-wildcard arguments are substituted everywhere as usual. A wildcard argument >: L <: H is substituted for a type lambda parameter X only under certain conditions.

    1. If Mode.AllowLambdaWildcardApply is set: The wildcard argument is substituted only if X appears in a toplevel refinement of the form

    { type A = X }

    and there are no other occurrences of X in the reduced type. In that case the refinement above is replaced by

    { type A >: L <: U }

    The allReplaced field indicates whether all occurrences of type lambda parameters in the reduced type have been replaced with arguments.

    2. If Mode.AllowLambdaWildcardApply is not set: All refinements of the form

    { type A = X }

    are replaced by:

    { type A >: L <: U }

    Any other occurrence of X in tycon is replaced by U, if the occurrence of X in tycon is covariant, or nonvariant, or by L, if the occurrence is contravariant.

    The idea is that the AllowLambdaWildcardApply mode is used to check whether a type can be soundly reduced, and to give an error or warning if that is not the case. By contrast, the default mode, with AllowLambdaWildcardApply not set, reduces all applications even if this yields a different type, so its postcondition is that no type parameters of tycon appear in the result type. Using this mode, we can guarantee that appliedTo will never produce a higher-kinded application with a type lambda as type constructor.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. object AppliedType

    Extractor for type application T[U_1, ..., U_n].

    Extractor for type application T[U_1, ..., U_n]. This is the refined type

    T { type p_1 v_1= U_1; ...; type p_n v_n= U_n }

    where v_i, p_i are the variances and names of the type parameters of T.

  5. def EtaExpandIfHK(tparams: List[TypeParamInfo], args: List[Type])(implicit ctx: Context): List[Type]

    Adapt all arguments to possible higher-kinded type parameters using etaExpandIfHK

  6. object EtaExpansion

    Extractor for

    Extractor for

    [v1 X1: B1, ..., vn Xn: Bn] -> C[X1, ..., Xn]

    where v1, ..., vn and B1, ..., Bn are the variances and bounds of the type parameters of the class C.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val boundsToHi: (Type) ⇒ Type

    If tp is a TypeBounds instance return its upper bound else return tp

  9. val boundsToLo: (Type) ⇒ Type

    If tp is a TypeBounds instance return its lower bound else return tp

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. val noBounds: (Type) ⇒ Type

    Assert type is not a TypeBounds instance and return it unchanged

  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. def varianceConforms(tparam1: TypeParamInfo, tparam2: TypeParamInfo)(implicit ctx: Context): Boolean

    Does the variance of type parameter tparam1 conform to the variance of type parameter tparam2?

  24. def varianceConforms(v1: Int, v2: Int): Boolean

    Does variance v1 conform to variance v2? This is the case if the variances are the same or sym is nonvariant.

  25. def variancesConform(tparams1: List[TypeParamInfo], tparams2: List[TypeParamInfo])(implicit ctx: Context): Boolean

    Do the variances of type parameters tparams1 conform to the variances of corresponding type parameters tparams2? This is only the case of tparams1 and tparams2 have the same length.

  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped