case class NamedType(name: SymbolTable.Name, tp: SymbolTable.Type) extends SymbolTable.Type with Product with Serializable
A class representing types with a name. When an application uses named arguments, the named argument types for calling isApplicable are represented as NamedType.
- Alphabetic
- By Inheritance
- NamedType
- Serializable
- Serializable
- Product
- Equals
- Type
- Annotatable
- TypeApiImpl
- TypeApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new NamedType(name: SymbolTable.Name, tp: SymbolTable.Type)
Type Members
-
class
FilterMapForeach extends SymbolTable.FilterTypeCollector
- Definition Classes
- Type
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
<:<(that: SymbolTable.Type): Boolean
Is this type a subtype of that type?
-
def
=:=(that: SymbolTable.Type): Boolean
Is this type equivalent to that type?
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addThrowsAnnotation(throwableSym: SymbolTable.Symbol): SymbolTable.Type
- Definition Classes
- Annotatable
-
def
annotations: List[SymbolTable.AnnotationInfo]
The annotations on this type.
The annotations on this type.
- Definition Classes
- Type → Annotatable
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asSeenFrom(pre: SymbolTable.Type, clazz: SymbolTable.Symbol): SymbolTable.Type
This type as seen from prefix
pre
and classclazz
.This type as seen from prefix
pre
and classclazz
. This means: Replace all thistypes ofclazz
or one of its subclasses bypre
and instantiate all parameters by arguments ofpre
. 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
-
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
-
def
baseClasses: List[SymbolTable.Symbol]
The list of all baseclasses of this type (including its own typeSymbol) in linearization order, starting with the class itself and ending in class Any.
-
def
baseType(clazz: SymbolTable.Symbol): SymbolTable.Type
The least type instance of given class which is a supertype of this type.
-
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
-
def
baseTypeSeq: SymbolTable.BaseTypeSeq
The base type sequence of T is the smallest set of (potentially existentially quantified) class types Ti, so that for each supertype T' (T <:< T'), there is a Ti so that T <:< Ti <:< T'.
The base type sequence of T is the smallest set of (potentially existentially quantified) class types Ti, so that for each supertype T' (T <:< T'), there is a Ti so that T <:< Ti <:< T'.
This is also known as the upward closed set of the partially ordered set of class types under Symbol#isLess (a refinement of Symbol#isSubclass).
See "Base Types and Member Definitions" in spec/03-types.md.
- Definition Classes
- Type
-
def
baseTypeSeqDepth: Depth
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
-
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
-
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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
cloneInfo(owner: SymbolTable.Symbol): SymbolTable.Type
If this is a ExistentialType, PolyType or MethodType, a copy with cloned type / value parameters owned by
owner
.If this is a ExistentialType, PolyType or MethodType, a copy with cloned type / value parameters owned by
owner
. Identity for all other types.- Definition Classes
- Type
-
def
collect[T](pf: PartialFunction[SymbolTable.Type, T]): List[T]
Apply
pf
to each part of this type on which the function is definedApply
pf
to each part of this type on which the function is defined- Definition Classes
- Type
-
def
companion: SymbolTable.Type
Type signature of the companion of the underlying class symbol.
Type signature of the companion of the underlying class symbol. NoType if the underlying symbol is not a class symbol, or if it doesn't have a companion.
- Definition Classes
- TypeApiImpl → TypeApi
-
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
-
def
computeMemberType(sym: SymbolTable.Symbol): SymbolTable.Type
- Definition Classes
- Type
-
def
contains(sym: SymbolTable.Symbol): Boolean
Does this type contain a reference to this symbol?
-
def
dealias: SymbolTable.Type
Expands type aliases.
-
def
dealiasWiden: SymbolTable.Type
Repeatedly apply widen and dealias until they have no effect.
Repeatedly apply widen and dealias until they have no effect. This compensates for the fact that type aliases can hide beneath singleton types and singleton types can hide inside type aliases. !!! - and yet it is still inadequate, because aliases and singletons might lurk in the upper bounds of an abstract type. See scala/bug#7051.
- Definition Classes
- Type
-
def
dealiasWidenChain: List[SymbolTable.Type]
All the types encountered in the course of dealiasing/widening, including each intermediate beta reduction step (whereas calling dealias applies as many as possible.)
All the types encountered in the course of dealiasing/widening, including each intermediate beta reduction step (whereas calling dealias applies as many as possible.)
- Definition Classes
- Type
-
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. -
def
declaration(name: SymbolTable.Name): SymbolTable.Symbol
- Definition Classes
- TypeApiImpl → TypeApi
- See also
-
def
declarations: SymbolTable.Scope
- Definition Classes
- TypeApiImpl → TypeApi
- See also
-
def
decls: SymbolTable.Scope
For a classtype or refined type, its defined or declared members; inherited by subtypes and typerefs.
-
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
-
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
-
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
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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
- TypeApiImpl → TypeApi
-
def
etaExpand: SymbolTable.Type
Converts higher-kinded TypeRefs to PolyTypes.
-
def
exists(p: (SymbolTable.Type) ⇒ Boolean): Boolean
Is there part of this type which satisfies predicate
p
? -
def
filterAnnotations(p: (SymbolTable.AnnotationInfo) ⇒ Boolean): SymbolTable.Type
- Definition Classes
- Type → Annotatable
-
final
def
finalResultType: SymbolTable.Type
For a curried/nullary method or poly type its non-method result type, the type itself for all other types
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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. -
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
- 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
-
def
findMembers(excludedFlags: Long, requiredFlags: Long): SymbolTable.Scope
Find all members meeting the flag requirements.
Find all members meeting the flag requirements.
If you require a DEFERRED member, you will get it if it exists -- even if there's an overriding concrete member. If you exclude DEFERRED members, or don't specify any requirements, you won't get deferred members (whether they have an overriding concrete member or not)
Thus, findMember requiring DEFERRED flags yields deferred members, while
findMember(excludedFlags = 0, requiredFlags = 0).filter(_.isDeferred)
may not (if there's a corresponding concrete member)Requirements take precedence over exclusions, so requiring and excluding DEFERRED will yield a DEFERRED member (if there is one).
- Definition Classes
- Type
-
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
-
def
forceDirectSuperclasses: Unit
If this is a lazy type corresponding to a subclass add it to its parents children
If this is a lazy type corresponding to a subclass add it to its parents children
- Definition Classes
- Type
-
def
foreach(f: (SymbolTable.Type) ⇒ Unit): Unit
Apply
f
to each part of this type -
def
getAnnotation(cls: SymbolTable.Symbol): Option[SymbolTable.AnnotationInfo]
- Definition Classes
- Annotatable
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hasAnnotation(cls: SymbolTable.Symbol): Boolean
Tests for, get, or remove an annotation
Tests for, get, or remove an annotation
- Definition Classes
- Annotatable
-
def
hasNonPrivateMember(name: SymbolTable.Name): Boolean
- Definition Classes
- Type
-
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
-
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. ErrorType on arity mismatch.
Amounts to substitution except for higher-kinded types. (See overridden method in TypeRef) -- @M
- Definition Classes
- Type
-
def
isComplete: Boolean
Is this type completed (i.e.
Is this type completed (i.e. not a lazy type)?
- Definition Classes
- Type
-
def
isDependentMethodType: Boolean
Is this type a dependent method type?
Is this type a dependent method type?
- Definition Classes
- Type
-
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
-
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
-
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
-
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
- Type
-
def
isHigherKinded: Boolean
Is this type higher-kinded, i.e., is it a type constructor @M
Is this type higher-kinded, i.e., is it a type constructor @M
- Definition Classes
- Type
-
def
isImmediatelyDependent: Boolean
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)?
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isShowAsInfixType: Boolean
Should this be printed as an infix type (@showAsInfix class &&[T, U])?
Should this be printed as an infix type (@showAsInfix class &&[T, U])?
- Definition Classes
- Type
-
def
isSpliceable: Boolean
- Definition Classes
- TypeApiImpl
-
final
def
isStable: Boolean
Does this type denote a stable reference (i.e.
Does this type denote a stable reference (i.e. singleton type)?
- Definition Classes
- Type
-
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
-
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
-
final
def
isVolatile: Boolean
Is this type dangerous (i.e.
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
- Type
-
def
isWildcard: Boolean
True for WildcardType or BoundedWildcardType.
True for WildcardType or BoundedWildcardType.
- Definition Classes
- Type
-
def
kind: String
The kind of this type; used for debugging
The kind of this type; used for debugging
- Definition Classes
- Type
-
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
-
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
-
def
map(f: (SymbolTable.Type) ⇒ SymbolTable.Type): SymbolTable.Type
Apply
f
to each part of this type; children get mapped before their parents -
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
-
def
matchesPattern(that: SymbolTable.Type): Boolean
Is this type a subtype of that type in a pattern context? Dummy 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? Dummy 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
-
def
member(name: SymbolTable.Name): SymbolTable.Symbol
The member with given name, an OverloadedSymbol if several exist, NoSymbol if none exist
-
def
memberBasedOnName(name: SymbolTable.Name, excludedFlags: Long): SymbolTable.Symbol
- Definition Classes
- Type
-
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
-
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
-
def
members: SymbolTable.Scope
A list of all members of this type (defined or inherited) Members appear in linearization order of their owners.
-
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
- val name: SymbolTable.Name
-
def
nameAndArgsString: String
- Definition Classes
- Type
-
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
- Type
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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)))Discussion: normalize is NOT usually what you want to be calling. The (very real) danger with normalize is that it will force types which would not otherwise have been forced, leading to mysterious behavioral differences, cycles, and other elements of mysteries. Under most conditions the method you should be calling is
dealiasWiden
(see that method for more info.)Here are a few of the side-effect-trail-leaving methods called by various implementations of normalize:
- sym.info
- tpe.etaExpand
- tpe.betaReduce
- tpe.memberType
- sym.nextOverriddenSymbol
- constraint.inst
If you've been around the compiler a while that list must fill your heart with fear.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
objectPrefix: String
- Attributes
- protected
- Definition Classes
- Type
-
final
def
orElse(alt: ⇒ SymbolTable.Type): SymbolTable.Type
Provides an alternate if type is NoType.
-
def
packageObject: SymbolTable.Symbol
- Definition Classes
- Type
-
def
packagePrefix: String
- Attributes
- protected
- Definition Classes
- Type
-
def
paramLists: List[List[SymbolTable.Symbol]]
For a method or poly type, a list of its value parameter sections, the empty list of lists for all other types.
For a method or poly type, a list of its value parameter sections, the empty list of lists for all other types.
- Definition Classes
- TypeApiImpl → TypeApi
-
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
-
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
-
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
- Type
-
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
-
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
-
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
-
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
-
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
-
def
removeAnnotation(cls: SymbolTable.Symbol): SymbolTable.Type
- Definition Classes
- Annotatable
-
def
resultApprox: SymbolTable.Type
Only used for dependent method types.
Only used for dependent method types.
- Definition Classes
- Type
-
def
resultType(actuals: List[SymbolTable.Type]): SymbolTable.Type
- Definition Classes
- Type
-
def
resultType: SymbolTable.Type
For a (nullary) method or poly type, its direct result type, the type itself for all other types.
-
def
safeToString: String
Method to be implemented in subclasses.
-
def
setAnnotations(annots: List[SymbolTable.AnnotationInfo]): SymbolTable.Type
- Definition Classes
- Type → Annotatable
-
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
-
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
-
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
-
def
stat_<:<(that: SymbolTable.Type): Boolean
- Definition Classes
- Type
-
def
staticAnnotations: collection.immutable.List[SymbolTable.AnnotationInfo]
- Definition Classes
- Annotatable
-
def
subst(from: List[SymbolTable.Symbol], to: List[SymbolTable.Type]): SymbolTable.Type
Substitute types
to
for occurrences of references to symbolsfrom
in this type.Substitute types
to
for occurrences of references to symbolsfrom
in this type.- Definition Classes
- Type
-
def
substSym(from: List[SymbolTable.Symbol], to: List[SymbolTable.Symbol]): SymbolTable.Type
Substitute symbols
to
for occurrences of symbolsfrom
in this type.Substitute symbols
to
for occurrences of symbolsfrom
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
-
def
substThis(from: SymbolTable.Symbol, to: SymbolTable.Symbol): SymbolTable.Type
- Definition Classes
- Type
-
def
substThis(from: SymbolTable.Symbol, to: SymbolTable.Type): SymbolTable.Type
Substitute all occurrences of
ThisType(from)
in this type byto
.Substitute all occurrences of
ThisType(from)
in this type byto
.!!! 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
-
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 assubstThis(from, to).substSym(symsFrom, symsTo)
.SubstThisAndSymMap
performs a breadth-first map over this type, which meant that symbol substitution occurred beforeThisType
substitution. Consequently, in substitution of aSingleType(ThisType(from), sym)
, symbols were rebound tofrom
rather thanto
.- Definition Classes
- Type
-
def
substituteSymbols(from: List[SymbolTable.Symbol], to: List[SymbolTable.Symbol]): SymbolTable.Type
Substitute symbols in
to
for corresponding occurrences of references to symbolsfrom
in this type.Substitute symbols in
to
for corresponding occurrences of references to symbolsfrom
in this type.- Definition Classes
- TypeApiImpl → TypeApi
-
def
substituteTypes(from: List[SymbolTable.Symbol], to: List[SymbolTable.Type]): SymbolTable.Type
Substitute types in
to
for corresponding occurrences of references to symbolsfrom
in this type.Substitute types in
to
for corresponding occurrences of references to symbolsfrom
in this type.- Definition Classes
- TypeApiImpl → TypeApi
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
takesTypeArgs: Boolean
Is this type a type constructor that is missing its type arguments?
-
def
termSymbol: SymbolTable.Symbol
The term symbol associated with the type Note that the symbol of the normalized type is returned (@see normalize)
-
def
termSymbolDirect: SymbolTable.Symbol
The term symbol directly associated with the type.
The term symbol directly associated with the type.
- Definition Classes
- Type
-
def
toLongString: String
The string representation of this type, with singletypes explained.
The string representation of this type, with singletypes explained.
- Definition Classes
- Type
-
final
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. UsessafeToString
to produce a string on each level.- Definition Classes
- Type → AnyRef → Any
- val tp: SymbolTable.Type
-
def
trimPrefix(str: String): String
- Definition Classes
- Type
-
def
typeArgs: List[SymbolTable.Type]
For a typeref, its arguments.
-
def
typeArguments: List[SymbolTable.Type]
- Definition Classes
- TypeApiImpl
-
def
typeConstructor: SymbolTable.Type
This type, without its type arguments @M
-
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
-
def
typeParams: List[SymbolTable.Symbol]
For a (potentially wrapped) poly type, its type parameters, the empty list for all other types
-
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.typeSymbol is not true for tp.sym, due to normalization.
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.
-
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
-
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
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
weak_<:<(that: SymbolTable.Type): Boolean
Is this type a weak subtype of that type? True also for numeric types, i.e.
-
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. -
final
def
withAnnotation(annot: SymbolTable.AnnotationInfo): SymbolTable.Type
- Definition Classes
- Annotatable
-
def
withAnnotations(annots: List[SymbolTable.AnnotationInfo]): SymbolTable.Type
- Definition Classes
- Type → Annotatable
-
def
withFilter(p: (SymbolTable.Type) ⇒ Boolean): FilterMapForeach
Returns all parts of this type which satisfy predicate
p
Returns all parts of this type which satisfy predicate
p
- Definition Classes
- Type
-
def
withoutAnnotations: SymbolTable.Type
- Definition Classes
- Type → Annotatable
Deprecated Value Members
-
def
boundSyms: Set[SymbolTable.Symbol]
For a (potentially wrapped) poly, method or existential type, its directly bound symbols, the empty set for all other types
For a (potentially wrapped) poly, method or existential type, its directly bound symbols, the empty set for all other types
- Definition Classes
- Type
- Annotations
- @deprecated
- Deprecated
(Since version 2.12.3) No longer used in the compiler implementation