scala.reflect.internal.Types

TypeVar

abstract case class TypeVar(origin: SymbolTable.Type, constr: SymbolTable.TypeConstraint) extends SymbolTable.Type with Product with Serializable

A class representing a type variable: not used after phase typer.

A higher-kinded TypeVar has params (Symbols) and typeArgs (Types). A TypeVar with nonEmpty typeArgs can only be instantiated by a higher-kinded type that can be applied to those args. A TypeVar is much like a TypeRef, except it has special logic for equality and subtyping.

Precondition for this class, enforced structurally: args.isEmpty && params.isEmpty.

Source
Types.scala
Linear Supertypes
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TypeVar
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Type
  7. Annotatable
  8. TypeApiImpl
  9. TypeApi
  10. TypeBase
  11. AnyRef
  12. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TypeVar(origin: SymbolTable.Type, constr: SymbolTable.TypeConstraint)

Type Members

  1. class FilterMapForeach extends SymbolTable.FilterTypeCollector

    Definition Classes
    Type

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

    Definition Classes
    Any
  3. final def ##(): Int

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (SymbolTable.TypeVar, B)

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to ArrowAssoc[SymbolTable.TypeVar] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. def <:<(that: SymbolTable.Type): Boolean

    Is this type a subtype of that type?

    Is this type a subtype of that type?

    Definition Classes
    TypeTypeApi
  7. def =:=(that: SymbolTable.Type): Boolean

    Is this type equivalent to that type?

    Is this type equivalent to that type?

    Definition Classes
    TypeTypeApi
  8. final def ==(arg0: AnyRef): Boolean

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

    Test two objects for equality.

    Test two objects for equality. The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    Any
  10. def addHiBound(tp: SymbolTable.Type, isNumericBound: Boolean = false): Unit

  11. def addLoBound(tp: SymbolTable.Type, isNumericBound: Boolean = false): Unit

  12. def annotations: List[SymbolTable.AnnotationInfo]

    The annotations on this type.

    The annotations on this type.

    Definition Classes
    TypeAnnotatable
  13. def applyArgs(newArgs: List[SymbolTable.Type]): SymbolTable.TypeVar

    Two occurrences of a higher-kinded typevar, e.

    Two occurrences of a higher-kinded typevar, e.g. ?CC[Int] and ?CC[String], correspond to two instances of TypeVar that share the same TypeConstraint.

    constr for ?CC only tracks type constructors anyway, so when ?CC[Int] <:< List[Int] and ?CC[String] <:< Iterable[String] ?CC's hibounds contains List and Iterable.

  14. final def asInstanceOf[T0]: T0

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown
    ClassCastException

    if the receiver object is not an instance of the erasure of type T0.

  15. def asSeenFrom(pre: SymbolTable.Type, clazz: SymbolTable.Symbol): SymbolTable.Type

    This type as seen from prefix pre and class clazz.

    This type as seen from prefix pre and class clazz. This means: Replace all thistypes of clazz or one of its subclasses by pre and instantiate all parameters by arguments of pre. Proceed analogously for thistypes referring to outer classes.

    Example: class D[T] { def m: T } class C extends p.D[Int] T.asSeenFrom(ThisType(C), D) (where D is owner of m)

    Int

    Definition Classes
    TypeTypeApi
  16. def atOwner(owner: SymbolTable.Symbol): SymbolTable.Type

    Make sure this type is correct as the info of given owner; clone it if not.

    Make sure this type is correct as the info of given owner; clone it if not.

    Definition Classes
    Type
  17. def baseClasses: List[SymbolTable.Symbol]

    The list of all baseclasses of this type (including its own typeSymbol) in reverse linearization order, starting with the class itself and ending in class Any.

    The list of all baseclasses of this type (including its own typeSymbol) in reverse linearization order, starting with the class itself and ending in class Any.

    Definition Classes
    TypeTypeApi
  18. def baseType(clazz: SymbolTable.Symbol): SymbolTable.Type

    The least type instance of given class which is a supertype of this type.

    The least type instance of given class which is a supertype of this type. Example: class D[T] class C extends p.D[Int] ThisType(C).baseType(D) = p.D[Int]

    Definition Classes
    TypeTypeApi
  19. def baseTypeIndex(sym: SymbolTable.Symbol): Int

    sym

    the class symbol

    returns

    the index of given class symbol in the BaseTypeSeq of this type, or -1 if no base type with given class symbol exists.

    Definition Classes
    Type
  20. def baseTypeSeq: SymbolTable.BaseTypeSeq

    The shortest sorted upwards closed array of types that contains this type as first element.

    The shortest sorted upwards closed array of types that contains this type as first element.

    A list or array of types ts is upwards closed if

    for all t in ts: for all typerefs p.s[args] such that t <: p.s[args] there exists a typeref p'.s[args'] in ts such that t <: p'.s['args] <: p.s[args],

    and

    for all singleton types p.s such that t <: p.s there exists a singleton type p'.s in ts such that t <: p'.s <: p.s

    Sorting is with respect to Symbol.isLess() on type symbols.

    Definition Classes
    Type
  21. def baseTypeSeqDepth: Int

    The maximum depth (@see typeDepth) of each type in the BaseTypeSeq of this type except the first.

    The maximum depth (@see typeDepth) of each type in the BaseTypeSeq of this type except the first.

    Definition Classes
    Type
  22. def betaReduce: SymbolTable.Type

    Performs a single step of beta-reduction on types.

    Performs a single step of beta-reduction on types. Given:

    type C[T] = B[T] type B[T] = A class A

    The following will happen after betaReduce is invoked: TypeRef(pre, <C>, List(Int)) is replaced by TypeRef(pre, <B>, List(Int))

    Unlike dealias, which recursively applies beta reduction, until it's stuck, betaReduce performs exactly one step and then returns.

    Definition Classes
    Type
  23. def boundSyms: Set[SymbolTable.Symbol]

    For a (potentially wrapped) poly or existential type, its bound symbols, the empty list for all other types

    For a (potentially wrapped) poly or existential type, its bound symbols, the empty list for all other types

    Definition Classes
    Type
  24. def bounds: SymbolTable.TypeBounds

    For a TypeBounds type, itself; for a reference denoting an abstract type, its bounds, for all other types, a TypeBounds type all of whose bounds are this type.

    For a TypeBounds type, itself; for a reference denoting an abstract type, its bounds, for all other types, a TypeBounds type all of whose bounds are this type.

    Definition Classes
    Type
  25. def clone(): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  26. def cloneInfo(owner: SymbolTable.Symbol): SymbolTable.Type

    If this is a poly- or methodtype, a copy with cloned type / value parameters owned by owner.

    If this is a poly- or methodtype, a copy with cloned type / value parameters owned by owner. Identity for all other types.

    Definition Classes
    Type
  27. def cloneInternal: SymbolTable.TypeVar

  28. def collect[T](pf: PartialFunction[SymbolTable.Type, T]): List[T]

    Apply pf' to each part of this type on which the function is defined

    Apply pf' to each part of this type on which the function is defined

    Definition Classes
    Type
  29. def complete(sym: SymbolTable.Symbol): Unit

    If this is a lazy type, assign a new type to sym.

    If this is a lazy type, assign a new type to sym.

    Definition Classes
    Type
  30. def computeMemberType(sym: SymbolTable.Symbol): SymbolTable.Type

    Definition Classes
    Type
  31. var constr: SymbolTable.TypeConstraint

  32. def contains(sym: SymbolTable.Symbol): Boolean

    Does this type contain a reference to this symbol?

    Does this type contain a reference to this symbol?

    Definition Classes
    TypeTypeApi
  33. def containsTp(tp: SymbolTable.Type): Boolean

    Does this type contain a reference to this type

    Does this type contain a reference to this type

    Definition Classes
    Type
  34. def dealias: SymbolTable.Type

    Expands type aliases.

    Expands type aliases.

    Definition Classes
    Type
  35. def decl(name: SymbolTable.Name): SymbolTable.Symbol

    The defined or declared members with name name in this type; an OverloadedSymbol if several exist, NoSymbol if none exist.

    The defined or declared members with name name in this type; an OverloadedSymbol if several exist, NoSymbol if none exist. Alternatives of overloaded symbol appear in the order they are declared.

    Definition Classes
    Type
  36. def declaration(name: SymbolTable.Name): SymbolTable.Symbol

    The defined or declared members with name name in this type; an OverloadedSymbol if several exist, NoSymbol if none exist.

    The defined or declared members with name name in this type; an OverloadedSymbol if several exist, NoSymbol if none exist. Alternatives of overloaded symbol appear in the order they are declared.

    Definition Classes
    TypeApiImplTypeApi
  37. def declarations: SymbolTable.Scope

    A Scope containing directly declared members of this type.

    A Scope containing directly declared members of this type. Unlike members this method doesn't returns inherited members.

    Members in the returned scope might appear in arbitrary order. Use declarations.sorted to get an ordered list of members.

    Definition Classes
    TypeApiImplTypeApi
  38. def decls: SymbolTable.Scope

    For a classtype or refined type, its defined or declared members; inherited by subtypes and typerefs.

    For a classtype or refined type, its defined or declared members; inherited by subtypes and typerefs. The empty scope for all other types.

    Definition Classes
    Type
  39. def deconst: SymbolTable.Type

    Map a constant type or not-null-type to its underlying base type, identity for all other types.

    Map a constant type or not-null-type to its underlying base type, identity for all other types.

    Definition Classes
    Type
  40. def deferredMembers: SymbolTable.Scope

    A list of all deferred symbols of this type (defined or inherited)

    A list of all deferred symbols of this type (defined or inherited)

    Definition Classes
    Type
  41. def directObjectString: String

    The string representation of this type when the direct object in a sentence.

    The string representation of this type when the direct object in a sentence. Normally this is no different from the regular representation, but modules read better as "object Foo" here and "Foo.type" the rest of the time.

    Definition Classes
    Type
  42. def dummyArgs: List[SymbolTable.Type]

    A list of placeholder types derived from the type parameters.

    A list of placeholder types derived from the type parameters. Used by RefinedType and TypeRef.

    Attributes
    protected
    Definition Classes
    Type
  43. def ensuring(cond: (SymbolTable.TypeVar) ⇒ Boolean, msg: ⇒ Any): SymbolTable.TypeVar

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to Ensuring[SymbolTable.TypeVar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  44. def ensuring(cond: (SymbolTable.TypeVar) ⇒ Boolean): SymbolTable.TypeVar

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to Ensuring[SymbolTable.TypeVar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  45. def ensuring(cond: Boolean, msg: ⇒ Any): SymbolTable.TypeVar

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to Ensuring[SymbolTable.TypeVar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  46. def ensuring(cond: Boolean): SymbolTable.TypeVar

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to Ensuring[SymbolTable.TypeVar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  47. final def eq(arg0: AnyRef): Boolean

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

    Definition Classes
    AnyRef
  48. def erasure: SymbolTable.Type

    The erased type corresponding to this type after all transformations from Scala to Java have been performed.

    The erased type corresponding to this type after all transformations from Scala to Java have been performed.

    Definition Classes
    TypeApiImplTypeApi
  49. def etaExpand: SymbolTable.Type

    Definition Classes
    Type
  50. def exists(p: (SymbolTable.Type) ⇒ Boolean): Boolean

    Is there part of this type which satisfies predicate p?

    Is there part of this type which satisfies predicate p?

    Definition Classes
    TypeTypeApi
  51. def filter(p: (SymbolTable.Type) ⇒ Boolean): List[SymbolTable.Type]

    Returns all parts of this type which satisfy predicate p

    Returns all parts of this type which satisfy predicate p

    Definition Classes
    Type
  52. def filterAnnotations(p: (SymbolTable.AnnotationInfo) ⇒ Boolean): SymbolTable.Type

    Definition Classes
    TypeAnnotatable
  53. def finalResultType: SymbolTable.Type

    For a curried/nullary method or poly type its non-method result type, the type itself for all other types

    For a curried/nullary method or poly type its non-method result type, the type itself for all other types

    Definition Classes
    Type
  54. def finalize(): Unit

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  55. def find(p: (SymbolTable.Type) ⇒ Boolean): Option[SymbolTable.Type]

    Returns optionally first type (in a preorder traversal) which satisfies predicate p, or None if none exists.

    Returns optionally first type (in a preorder traversal) which satisfies predicate p, or None if none exists.

    Definition Classes
    TypeTypeApi
  56. def findMember(name: SymbolTable.Name, excludedFlags: Long, requiredFlags: Long, stableOnly: Boolean): SymbolTable.Symbol

    Find member(s) in this type.

    Find member(s) in this type. If several members matching criteria are found, they are returned in an OverloadedSymbol

    name

    The member's name, where nme.ANYNAME means unspecified

    excludedFlags

    Returned members do not have these flags

    requiredFlags

    Returned members do have these flags

    stableOnly

    If set, return only members that are types or stable values

    Definition Classes
    Type
  57. def findMembers(excludedFlags: Long, requiredFlags: Long): SymbolTable.Scope

    Definition Classes
    Type
  58. def firstParent: SymbolTable.Type

    For a class with nonEmpty parents, the first parent.

    For a class with nonEmpty parents, the first parent. Otherwise some specific fixed top type.

    Definition Classes
    Type
  59. def foreach(f: (SymbolTable.Type) ⇒ Unit): Unit

    Apply f to each part of this type

    Apply f to each part of this type

    Definition Classes
    TypeTypeApi
  60. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  61. def getAnnotation(cls: SymbolTable.Symbol): Option[SymbolTable.AnnotationInfo]

    Definition Classes
    Annotatable
  62. final def getClass(): Class[_]

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  63. def hasAnnotation(cls: SymbolTable.Symbol): Boolean

    Tests for, get, or remove an annotation

    Tests for, get, or remove an annotation

    Definition Classes
    Annotatable
  64. def implicitMembers: SymbolTable.Scope

    A list of all implicit symbols of this type (defined or inherited)

    A list of all implicit symbols of this type (defined or inherited)

    Definition Classes
    Type
  65. def instValid: Boolean

    The constraint associated with the variable Syncnote: Type variables are assumed to be used from only one thread.

    The constraint associated with the variable Syncnote: Type variables are assumed to be used from only one thread. They are not exposed in api.Types and are used only locally in operations that are exposed from types. Hence, no syncing of constr or encounteredHigherLevel or suspended accesses should be necessary.

  66. def instantiateTypeParams(formals: List[SymbolTable.Symbol], actuals: List[SymbolTable.Type]): SymbolTable.Type

    Replace formal type parameter symbols with actual type arguments.

    Replace formal type parameter symbols with actual type arguments.

    Amounts to substitution except for higher-kinded types. (See overridden method in TypeRef) -- @M

    Definition Classes
    Type
  67. def isComplete: Boolean

    Is this type completed (i.

    Is this type completed (i.e. not a lazy type)?

    Definition Classes
    Type
  68. def isConcrete: Boolean

    Definition Classes
    TypeApiImpl
  69. def isDependentMethodType: Boolean

    Is this type a dependent method type?

    Is this type a dependent method type?

    Definition Classes
    Type
  70. def isErroneous: Boolean

    Is this type produced as a repair for an error?

    Is this type produced as a repair for an error?

    Definition Classes
    Type
  71. def isError: Boolean

    Is this type produced as a repair for an error?

    Is this type produced as a repair for an error?

    Definition Classes
    Type
  72. def isFinalType: Boolean

    Can this type only be subtyped by bottom types? This is assessed to be the case if the class is final, and all type parameters (if any) are invariant.

    Can this type only be subtyped by bottom types? This is assessed to be the case if the class is final, and all type parameters (if any) are invariant.

    Definition Classes
    Type
  73. def isGround: Boolean

    A test whether a type contains any unification type variables.

    A test whether a type contains any unification type variables. Overridden with custom logic except where trivially true.

    Definition Classes
    TypeVarType
  74. def isHigherKinded: Boolean

    Is this type higher-kinded, i.

    Is this type higher-kinded, i.e., is it a type constructor @M

    Definition Classes
    TypeVarType
  75. def isImmediatelyDependent: Boolean

    Does this type depend immediately on an enclosing method parameter? I.

    Does this type depend immediately on an enclosing method parameter? I.e., is it a singleton type whose termSymbol refers to an argument of the symbol's owner (which is a method)?

    Definition Classes
    Type
  76. final def isInstanceOf[T0]: Boolean

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    Definition Classes
    Any
  77. def isNotNull: Boolean

    Is this type guaranteed not to have null as a value?

    Is this type guaranteed not to have null as a value?

    Definition Classes
    Type
  78. def isRelatable(tp: SymbolTable.Type): Boolean

    Can this variable be related in a constraint to type tp? This is not the case if tp contains type skolems whose skolemization level is higher than the level of this variable.

  79. def isSpliceable: Boolean

    Definition Classes
    TypeApiImpl
  80. def isStable: Boolean

    Does this type denote a stable reference (i.

    Does this type denote a stable reference (i.e. singleton type)?

    Definition Classes
    TypeVarType
  81. def isStructuralRefinement: Boolean

    Is this type a structural refinement type (it refines members that have not been inherited)

    Is this type a structural refinement type (it refines members that have not been inherited)

    Definition Classes
    Type
  82. def isTrivial: Boolean

    Types for which asSeenFrom always is the identity, no matter what prefix or owner.

    Types for which asSeenFrom always is the identity, no matter what prefix or owner.

    Definition Classes
    Type
  83. def isVolatile: Boolean

    Is this type dangerous (i.

    Is this type dangerous (i.e. it might contain conflicting type information when empty, so that it can be constructed so that type unsoundness results.) A dangerous type has an underlying type of the form T_1 with T_n { decls }, where one of the T_i (i > 1) is an abstract type.

    Definition Classes
    TypeVarType
  84. def isWildcard: Boolean

    True for WildcardType or BoundedWildcardType.

    True for WildcardType or BoundedWildcardType.

    Definition Classes
    Type
  85. def kind: String

    The kind of this type; used for debugging

    The kind of this type; used for debugging

    Definition Classes
    TypeVarTypeTypeApi
  86. val level: Int

    The variable's skolemization level

  87. def load(sym: SymbolTable.Symbol): Unit

    If this is a symbol loader type, load and assign a new type to sym.

    If this is a symbol loader type, load and assign a new type to sym.

    Definition Classes
    Type
  88. def looselyMatches(that: SymbolTable.Type): Boolean

    Same as matches, except that non-method types are always assumed to match.

    Same as matches, except that non-method types are always assumed to match.

    Definition Classes
    Type
  89. def map(f: (SymbolTable.Type) ⇒ SymbolTable.Type): SymbolTable.Type

    Apply f to each part of this type; children get mapped before their parents

    Apply f to each part of this type; children get mapped before their parents

    Definition Classes
    TypeTypeApi
  90. def matches(that: SymbolTable.Type): Boolean

    Is this type close enough to that type so that members with the two type would override each other? This means:

    Is this type close enough to that type so that members with the two type would override each other? This means:

    • Either both types are polytypes with the same number of type parameters and their result types match after renaming corresponding type parameters
    • Or both types are (nullary) method types with equivalent type parameter types and matching result types
    • Or both types are equivalent
    • Or phase.erasedTypes is false and both types are neither method nor poly types.
    Definition Classes
    Type
  91. def matchesPattern(that: SymbolTable.Type): Boolean

    Is this type a subtype of that type in a pattern context? Any type arguments on the right hand side are replaced with fresh existentials, except for Arrays.

    Is this type a subtype of that type in a pattern context? Any type arguments on the right hand side are replaced with fresh existentials, except for Arrays.

    See bug1434.scala for an example of code which would fail if only a <:< test were applied.

    Definition Classes
    Type
  92. def member(name: SymbolTable.Name): SymbolTable.Symbol

    The member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist

    The member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist

    Definition Classes
    TypeTypeApi
  93. def memberBasedOnName(name: SymbolTable.Name, excludedFlags: Long): SymbolTable.Symbol

    Definition Classes
    Type
  94. def memberInfo(sym: SymbolTable.Symbol): SymbolTable.Type

    The info of sym, seen as a member of this type.

    The info of sym, seen as a member of this type.

    Example:

    class D[T] { def m: T }
    class C extends p.D[Int]
    ThisType(C).memberType(m) = Int
    Definition Classes
    Type
  95. def memberType(sym: SymbolTable.Symbol): SymbolTable.Type

    The type of sym, seen as a member of this type.

    The type of sym, seen as a member of this type.

    Definition Classes
    Type
  96. def members: SymbolTable.Scope

    A list of all members of this type (defined or inherited) Members appear in linearization order of their owners.

    A list of all members of this type (defined or inherited) Members appear in linearization order of their owners. Members with the same owner appear in reverse order of their declarations.

    Definition Classes
    TypeTypeApi
  97. def membersBasedOnFlags(excludedFlags: Long, requiredFlags: Long): SymbolTable.Scope

    Members excluding and requiring the given flags.

    Members excluding and requiring the given flags. Note: unfortunately it doesn't work to exclude DEFERRED this way.

    Definition Classes
    Type
  98. def membersWithFlags(requiredFlags: Long): SymbolTable.Scope

    All members with the given flags, excluding bridges.

    All members with the given flags, excluding bridges.

    Definition Classes
    Type
  99. def narrow: SymbolTable.Type

    Map to a singleton type which is a subtype of this type.

    Map to a singleton type which is a subtype of this type. The fallback implemented here gives:

    T.narrow  =  (T {}).this.type

    Overridden where we know more about where types come from.

    Definition Classes
    TypeTypeApi
  100. final def ne(arg0: AnyRef): Boolean

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

    Definition Classes
    AnyRef
  101. def nonLocalMember(name: SymbolTable.Name): SymbolTable.Symbol

    The non-local member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist

    The non-local member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist

    Definition Classes
    Type
  102. def nonPrivateDecl(name: SymbolTable.Name): SymbolTable.Symbol

    The non-private defined or declared members with name name in this type; an OverloadedSymbol if several exist, NoSymbol if none exist.

    The non-private defined or declared members with name name in this type; an OverloadedSymbol if several exist, NoSymbol if none exist. Alternatives of overloaded symbol appear in the order they are declared.

    Definition Classes
    Type
  103. def nonPrivateDeclaration(name: SymbolTable.Name): SymbolTable.Symbol

    Definition Classes
    TypeApiImpl
  104. def nonPrivateDecls: List[SymbolTable.Symbol]

    A list of all non-private members defined or declared in this type.

    A list of all non-private members defined or declared in this type.

    Definition Classes
    Type
  105. def nonPrivateMember(name: SymbolTable.Name): SymbolTable.Symbol

    The non-private member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist.

    The non-private member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist. Bridges are excluded from the result

    Definition Classes
    Type
  106. def nonPrivateMemberAdmitting(name: SymbolTable.Name, admit: Long): SymbolTable.Symbol

    The non-private member with given name, admitting members with given flags admit.

    The non-private member with given name, admitting members with given flags admit. "Admitting" refers to the fact that members with a PRIVATE, BRIDGE, or VBRIDGE flag are usually excluded from findMember results, but supplying any of those flags to this method disables that exclusion.

    An OverloadedSymbol if several exist, NoSymbol if none exists.

    Definition Classes
    Type
  107. def nonPrivateMembers: SymbolTable.Scope

    A list of all non-private members of this type (defined or inherited)

    A list of all non-private members of this type (defined or inherited)

    Definition Classes
    Type
  108. def nonPrivateMembersAdmitting(admit: Long): SymbolTable.Scope

    A list of all non-private members of this type (defined or inherited), admitting members with given flags admit

    A list of all non-private members of this type (defined or inherited), admitting members with given flags admit

    Definition Classes
    Type
  109. def nonPrivateMembersWithFlags(requiredFlags: Long): SymbolTable.Scope

    All non-private members with the given flags, excluding bridges.

    All non-private members with the given flags, excluding bridges.

    Definition Classes
    Type
  110. def normalize: SymbolTable.Type

    Reduce to beta eta-long normal form.

    Reduce to beta eta-long normal form. Expands type aliases and converts higher-kinded TypeRefs to PolyTypes. Functions on types are also implemented as PolyTypes.

    Example: (in the below, <List> is the type constructor of List) TypeRef(pre, <List>, List()) is replaced by PolyType(X, TypeRef(pre, <List>, List(X)))

    Definition Classes
    TypeVarTypeTypeApi
  111. def notNull: SymbolTable.Type

    Mixin a NotNull trait unless type already has one .

    Mixin a NotNull trait unless type already has one ...if the option is given, since it is causing typing bugs.

    Definition Classes
    Type
  112. final def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  113. final def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  114. def objectPrefix: String

    Attributes
    protected
    Definition Classes
    Type
  115. val origin: SymbolTable.Type

  116. def originLocation: String

  117. def originName: String

  118. def packagePrefix: String

    Attributes
    protected
    Definition Classes
    Type
  119. def paramSectionCount: Int

    For a method type, the number of its value parameter sections, 0 for all other types

    For a method type, the number of its value parameter sections, 0 for all other types

    Definition Classes
    Type
  120. def paramTypes: List[SymbolTable.Type]

    For a method or poly type, the types of its first value parameter section, the empty list for all other types

    For a method or poly type, the types of its first value parameter section, the empty list for all other types

    Definition Classes
    Type
  121. def params: List[SymbolTable.Symbol]

    For a method or poly type, its first value parameter section, the empty list for all other types

    For a method or poly type, its first value parameter section, the empty list for all other types

    Definition Classes
    TypeVarType
  122. def paramss: List[List[SymbolTable.Symbol]]

    For a method or poly type, a list of its value parameter sections, the empty list for all other types

    For a method or poly type, a list of its value parameter sections, the empty list for all other types

    Definition Classes
    Type
  123. def parents: List[SymbolTable.Type]

    For a class or intersection type, its parents.

    For a class or intersection type, its parents. For a TypeBounds type, the parents of its hi bound. inherited by typerefs, singleton types, and refinement types, The empty list for all other types

    Definition Classes
    Type
  124. def prefix: SymbolTable.Type

    For a typeref or single-type, the prefix of the normalized type (@see normalize).

    For a typeref or single-type, the prefix of the normalized type (@see normalize). NoType for all other types.

    Definition Classes
    Type
  125. def prefixChain: List[SymbolTable.Type]

    A chain of all typeref or singletype prefixes of this type, longest first.

    A chain of all typeref or singletype prefixes of this type, longest first. (Only used from safeToString.)

    Definition Classes
    Type
  126. def prefixString: String

    The string representation of this type used as a prefix

    The string representation of this type used as a prefix

    Definition Classes
    Type
  127. def registerBound(tp: SymbolTable.Type, isLowerBound: Boolean, isNumericBound: Boolean = false): Boolean

    Called when a TypeVar is involved in a subtyping check.

    Called when a TypeVar is involved in a subtyping check. Result is whether this TypeVar could plausibly be a [super/sub]type of argument tp and if so, tracks tp as a [lower/upper] bound of this TypeVar.

    if (isLowerBound) this typevar could be a subtype, track tp as a lower bound if (!isLowerBound) this typevar could be a supertype, track tp as an upper bound

    If isNumericBound is true, the subtype check is performed with weak_<:< instead of <:<.

  128. def registerTypeEquality(tp: SymbolTable.Type, typeVarLHS: Boolean): Boolean

  129. def registerTypeSelection(sym: SymbolTable.Symbol, tp: SymbolTable.Type): Boolean

    ?A.T =:= tp is rewritten as the constraint ?A <: {type T = tp}

    ?A.T =:= tp is rewritten as the constraint ?A <: {type T = tp}

    TODO: make these constraints count (incorporate them into implicit search in applyImplicitArgs) (T corresponds to @param sym)

  130. def remove(clazz: SymbolTable.Symbol): SymbolTable.Type

    If this is a TypeRef clazz[T], return the argument T otherwise return this type

    If this is a TypeRef clazz[T], return the argument T otherwise return this type

    Definition Classes
    Type
  131. def removeAnnotation(cls: SymbolTable.Symbol): SymbolTable.Type

    Definition Classes
    Annotatable
  132. def resultApprox: SymbolTable.Type

    Only used for dependent method types.

    Only used for dependent method types.

    Definition Classes
    Type
  133. def resultType(actuals: List[SymbolTable.Type]): SymbolTable.Type

    Definition Classes
    Type
  134. def resultType: SymbolTable.Type

    For a (nullary) method or poly type, its direct result type, the type itself for all other types.

    For a (nullary) method or poly type, its direct result type, the type itself for all other types.

    Definition Classes
    Type
  135. def safeToString: String

    Method to be implemented in subclasses.

    Method to be implemented in subclasses. Converts this type to a string in calling toString for its parts.

    Definition Classes
    TypeVarType
  136. def selfsym: SymbolTable.Symbol

    The selfsym of an annotated type, or NoSymbol of anything else

    The selfsym of an annotated type, or NoSymbol of anything else

    Definition Classes
    Type
  137. def setAnnotations(annots: List[SymbolTable.AnnotationInfo]): SymbolTable.Type

    Definition Classes
    TypeAnnotatable
  138. def setInst(tp: SymbolTable.Type): Unit

  139. def skolemizeExistential: SymbolTable.Type

    A simple version of skolemizeExistential for situations where owner or unpack location do not matter (typically used in subtype tests)

    A simple version of skolemizeExistential for situations where owner or unpack location do not matter (typically used in subtype tests)

    Definition Classes
    Type
  140. def skolemizeExistential(owner: SymbolTable.Symbol, origin: AnyRef): SymbolTable.Type

    If this type is an existential, turn all existentially bound variables to type skolems.

    If this type is an existential, turn all existentially bound variables to type skolems.

    owner

    The owner of the created type skolems

    origin

    The tree whose type was an existential for which the skolem was created.

    Definition Classes
    Type
  141. def skolemsExceptMethodTypeParams: List[SymbolTable.Symbol]

    The (existential or otherwise) skolems and existentially quantified variables which are free in this type

    The (existential or otherwise) skolems and existentially quantified variables which are free in this type

    Definition Classes
    Type
  142. def specializes(sym: SymbolTable.Symbol): Boolean

    Does this type implement symbol sym with same or stronger type?

    Does this type implement symbol sym with same or stronger type?

    Definition Classes
    Type
  143. def stat_<:<(that: SymbolTable.Type): Boolean

    Definition Classes
    Type
  144. def stripAnnotations: SymbolTable.Type

    Remove any annotations from this type and from any types embedded in this type.

    Remove any annotations from this type and from any types embedded in this type.

    Definition Classes
    Type
  145. def subst(from: List[SymbolTable.Symbol], to: List[SymbolTable.Type]): SymbolTable.Type

    Substitute types to for occurrences of references to symbols from in this type.

    Substitute types to for occurrences of references to symbols from in this type.

    Definition Classes
    Type
  146. def substSym(from: List[SymbolTable.Symbol], to: List[SymbolTable.Symbol]): SymbolTable.Type

    Substitute symbols to for occurrences of symbols from in this type.

    Substitute symbols to for occurrences of symbols from in this type.

    !!! NOTE !!!: If you need to do a substThis and a substSym, the substThis has to come first, as otherwise symbols will immediately get rebound in typeRef to the old symbol.

    Definition Classes
    Type
  147. def substThis(from: SymbolTable.Symbol, to: SymbolTable.Symbol): SymbolTable.Type

    Definition Classes
    Type
  148. def substThis(from: SymbolTable.Symbol, to: SymbolTable.Type): SymbolTable.Type

    Substitute all occurrences of ThisType(from) in this type by to.

    Substitute all occurrences of ThisType(from) in this type by to.

    !!! NOTE !!!: If you need to do a substThis and a substSym, the substThis has to come first, as otherwise symbols will immediately get rebound in typeRef to the old symbol.

    Definition Classes
    Type
  149. def substThisAndSym(from: SymbolTable.Symbol, to: SymbolTable.Type, symsFrom: List[SymbolTable.Symbol], symsTo: List[SymbolTable.Symbol]): SymbolTable.Type

    Performs both substThis and substSym, in that order.

    Performs both substThis and substSym, in that order.

    [JZ] Reverted SubstThisAndSymMap from 334872, which was not the same as substThis(from, to).substSym(symsFrom, symsTo).

    SubstThisAndSymMap performs a breadth-first map over this type, which meant that symbol substitution occured before ThisType substitution. Consequently, in substitution of a SingleType(ThisType(from), sym), symbols were rebound to from rather than to.

    Definition Classes
    Type
  150. def substituteSymbols(from: List[SymbolTable.Symbol], to: List[SymbolTable.Symbol]): SymbolTable.Type

    Substitute symbols in to for corresponding occurrences of references to symbols from in this type.

    Substitute symbols in to for corresponding occurrences of references to symbols from in this type.

    Definition Classes
    TypeApiImplTypeApi
  151. def substituteTypes(from: List[SymbolTable.Symbol], to: List[SymbolTable.Type]): SymbolTable.Type

    Substitute types in to for corresponding occurrences of references to symbols from in this type.

    Substitute types in to for corresponding occurrences of references to symbols from in this type.

    Definition Classes
    TypeApiImplTypeApi
  152. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  153. def takesTypeArgs: Boolean

    Is this type a type constructor that is missing its type arguments?

    Is this type a type constructor that is missing its type arguments?

    Definition Classes
    TypeTypeApi
  154. def termSymbol: SymbolTable.Symbol

    The term symbol associated with the type Note that the symbol of the normalized type is returned (@see normalize)

    The term symbol associated with the type Note that the symbol of the normalized type is returned (@see normalize)

    Definition Classes
    TypeTypeApi
  155. def termSymbolDirect: SymbolTable.Symbol

    The term symbol directly associated with the type.

    The term symbol directly associated with the type.

    Definition Classes
    Type
  156. def throwsAnnotations(): List[SymbolTable.Symbol]

    Symbols of any @throws annotations on this symbol.

    Symbols of any @throws annotations on this symbol.

    Definition Classes
    Annotatable
  157. def toLongString: String

    The string representation of this type, with singletypes explained.

    The string representation of this type, with singletypes explained.

    Definition Classes
    Type
  158. def toString(): String

    Convert toString avoiding infinite recursions by cutting off after maxTostringRecursions recursion levels.

    Convert toString avoiding infinite recursions by cutting off after maxTostringRecursions recursion levels. Uses safeToString to produce a string on each level.

    returns

    a String representation of the object.

    Definition Classes
    Type → AnyRef → Any
  159. def trimPrefix(str: String): String

    Definition Classes
    Type
  160. def typeArgs: List[SymbolTable.Type]

    For a typeref, its arguments.

    For a typeref, its arguments. The empty list for all other types

    Definition Classes
    TypeVarType
  161. def typeArguments: List[SymbolTable.Type]

    Definition Classes
    TypeApiImpl
  162. def typeConstructor: SymbolTable.Type

    This type, without its type arguments @M

    This type, without its type arguments @M

    Definition Classes
    TypeTypeApi
  163. def typeOfThis: SymbolTable.Type

    The type of this of a class type or reference type.

    The type of this of a class type or reference type.

    Definition Classes
    Type
  164. def typeParams: List[SymbolTable.Symbol]

    For a (potentially wrapped) poly type, its type parameters, the empty list for all other types

    For a (potentially wrapped) poly type, its type parameters, the empty list for all other types

    Definition Classes
    Type
  165. def typeSymbol: SymbolTable.Symbol

    The type symbol associated with the type Note that the symbol of the normalized type is returned (@see normalize) A type's typeSymbol should if possible not be inspected directly, due to the likelihood that what is true for tp.

    The type symbol associated with the type Note that the symbol of the normalized type is returned (@see normalize) A type's typeSymbol should if possible not be inspected directly, due to the likelihood that what is true for tp.typeSymbol is not true for tp.sym, due to normalization.

    Definition Classes
    TypeVarTypeTypeApi
  166. def typeSymbolDirect: SymbolTable.Symbol

    The type symbol directly associated with the type.

    The type symbol directly associated with the type. In other words, no normalization is performed: if this is an alias type, the symbol returned is that of the alias, not the underlying type.

    Definition Classes
    Type
  167. def typeVarString: String

    Attributes
    protected
  168. def underlying: SymbolTable.Type

    The base type underlying a type proxy, identity on all other types

    The base type underlying a type proxy, identity on all other types

    Definition Classes
    Type
  169. def untouchable: Boolean

  170. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  173. def weak_<:<(that: SymbolTable.Type): Boolean

    Is this type a weak subtype of that type? True also for numeric types, i.

    Is this type a weak subtype of that type? True also for numeric types, i.e. Int weak_<:< Long.

    Definition Classes
    Type
  174. def widen: SymbolTable.Type

    Widen from singleton type to its underlying non-singleton base type by applying one or more underlying dereferences, identity for all other types.

    Widen from singleton type to its underlying non-singleton base type by applying one or more underlying dereferences, identity for all other types.

    class Outer { class C ; val x: C } val o: Outer <o.x.type>.widen = o.C

    Definition Classes
    TypeTypeApi
  175. final def withAnnotation(annot: SymbolTable.AnnotationInfo): SymbolTable.Type

    Definition Classes
    Annotatable
  176. def withAnnotations(annots: List[SymbolTable.AnnotationInfo]): SymbolTable.Type

    Definition Classes
    TypeAnnotatable
  177. def withFilter(p: (SymbolTable.Type) ⇒ Boolean): FilterMapForeach

    Definition Classes
    Type
  178. def withSelfsym(sym: SymbolTable.Symbol): SymbolTable.Type

    Set the self symbol of an annotated type, or do nothing otherwise.

    Set the self symbol of an annotated type, or do nothing otherwise.

    Definition Classes
    Type
  179. def withoutAnnotations: SymbolTable.Type

    Definition Classes
    TypeAnnotatable
  180. def [B](y: B): (SymbolTable.TypeVar, B)

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to ArrowAssoc[SymbolTable.TypeVar] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (typeVar: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (typeVar: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: SymbolTable.TypeVar

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to ArrowAssoc[SymbolTable.TypeVar] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (typeVar: ArrowAssoc[SymbolTable.TypeVar]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: SymbolTable.TypeVar

    Implicit information
    This member is added by an implicit conversion from SymbolTable.TypeVar to Ensuring[SymbolTable.TypeVar] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (typeVar: Ensuring[SymbolTable.TypeVar]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Serializable

Inherited from java.io.Serializable

Inherited from Product

Inherited from Equals

Inherited from SymbolTable.Type

Inherited from SymbolTable.TypeApiImpl

Inherited from SymbolTable.TypeApi

Inherited from SymbolTable.TypeBase

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from SymbolTable.TypeVar to StringAdd

Inherited by implicit conversion any2stringfmt from SymbolTable.TypeVar to StringFormat

Inherited by implicit conversion any2ArrowAssoc from SymbolTable.TypeVar to ArrowAssoc[SymbolTable.TypeVar]

Inherited by implicit conversion any2Ensuring from SymbolTable.TypeVar to Ensuring[SymbolTable.TypeVar]

No Group