Main class representing types.
The principal subclasses and sub-objects are as follows:
Type -+- ProxyType --+- NamedType ----+--- TypeRef
| | \
| +- SingletonType-+-+- TermRef
| | |
| | +--- ThisType
| | +--- SuperType
| | +--- ConstantType
| | +--- MethodParam
| | +----RecThis
| | +--- SkolemType
| +- PolyParam
| +- RefinedOrRecType -+-- RefinedType
| | -+-- RecType
| +- HKApply
| +- TypeBounds
| +- ExprType
| +- AnnotatedType
| +- TypeVar
| +- PolyType
|
+- GroundType -+- AndType
+- OrType
+- MethodType -----+- ImplicitMethodType
| +- JavaMethodType
+- ClassInfo
|
+- NoType
+- NoPrefix
+- ErrorType
+- WildcardType
Note: please keep in sync with copy in docs/docs/internals/type-system.md
.
Constructors
Members
Is this type a subtype of that type?
Is this type a subtype of that type?
Is this type the same as that type?
This is the case iff this <:< that
and that <:< this
.
Is this type the same as that type?
This is the case iff this <:< that
and that <:< this
.
Convert a type constructor TC
which has type parameters T1, ..., Tn
in a context where type parameters U1,...,Un
are expected to
LambdaXYZ { Apply = TCh...
Convert a type constructor TC
which has type parameters T1, ..., Tn
in a context where type parameters U1,...,Un
are expected to
LambdaXYZ { Apply = TC[hk$0, ..., hk$n] }
Here, XYZ corresponds to the variances of
- U1,...,Un
if the variances of T1,...,Tn
are pairwise compatible with U1,...,Un
,
- T1,...,Tn
otherwise.
v1 is compatible with v2, if v1 = v2 or v2 is non-variant.
Eta expand if self
is a (non-lambda) class reference and bound
is a higher-kinded type
Eta expand if self
is a (non-lambda) class reference and bound
is a higher-kinded type
Lambda abstract self
with given type parameters. Examples:
type T[X] = U becomes type T = [X] -> U
type T[X] >: L <: U becomes type T >: L <: ([X] -> U)
TODO: Handle parameterized lower bounds
Lambda abstract self
with given type parameters. Examples:
type T[X] = U becomes type T = [X] -> U
type T[X] >: L <: U becomes type T >: L <: ([X] -> U)
TODO: Handle parameterized lower bounds
The set of abstract term members of this type.
The set of abstract term members of this type.
The set of abstract type members of this type.
The set of abstract type members of this type.
If argument A and type parameter P are higher-kinded, adapt the variances of A to those of P, ensuring that the variances of the type lambda A agree wit...
[X] [List]
[X][X]
[+X][X]
GenericCompanion[[X] -> ListBuffer[X]] <: GenericCompanion[[+X] -> GenTraversable[X]]
[X][X]
If argument A and type parameter P are higher-kinded, adapt the variances of A to those of P, ensuring that the variances of the type lambda A agree with the variances of corresponding higher-kinded type parameters of P. Example:
class GenericCompanion[+CC[X]] GenericCompanion[List]
with adaptHkVariances, the argument List
will expand to
[X] => List[X]
instead of
[+X] => List[X]
even though List
is covariant. This adaptation is necessary to ignore conflicting
variances in overriding members that have types of hk-type parameters such as
GenericCompanion[GenTraversable]
or GenericCompanion[ListBuffer]
.
When checking overriding, we need to validate the subtype relationship
GenericCompanion[[X] -> ListBuffer[X]] <: GenericCompanion[[+X] -> GenTraversable[X]]
Without adaptation, this would be false, and hence an overriding error would result. But with adaptation, the rhs argument will be adapted to
[X] -> GenTraversable[X]
which makes the subtype test succeed. The crucial point here is that, since GenericCompanion only expects a non-variant CC, the fact that GenTraversable is covariant is irrelevant, so can be ignored.
The type representing
T[U1, ..., Un]
where
The type representing
T[U1, ..., Un]
where
If this is the image of a type argument; recover the type argument, otherwise NoType.
If this is the image of a type argument; recover the type argument, otherwise NoType.
If this is an encoding of a (partially) applied type, return its arguments, otherwise return Nil. Existential types in arguments are returned as TypeBou...
If this is an encoding of a (partially) applied type, return its arguments, otherwise return Nil. Existential types in arguments are returned as TypeBounds instances.
Argument types where existential types in arguments are disallowed
Argument types where existential types in arguments are disallowed
Argument types where existential types in arguments are approximated by their upper bound
Argument types where existential types in arguments are approximated by their upper bound
Argument types where existential types in arguments are approximated by their lower bound
Argument types where existential types in arguments are approximated by their lower bound
This type seen as if it were the type of a member of prefix type pre
declared in class cls
.
This type seen as if it were the type of a member of prefix type pre
declared in class cls
.
The type arguments of this type's base type instance wrt. base
.
Existential types in arguments are returned as TypeBounds instances.
The type arguments of this type's base type instance wrt. base
.
Existential types in arguments are returned as TypeBounds instances.
The type arguments of this type's base type instance wrt.base
.
Existential types in arguments are disallowed.
The type arguments of this type's base type instance wrt.base
.
Existential types in arguments are disallowed.
The type arguments of this type's base type instance wrt.base
.
Existential types in arguments are approximated by their upper bound.
The type arguments of this type's base type instance wrt.base
.
Existential types in arguments are approximated by their upper bound.
The type arguments of this type's base type instance wrt.base
.
Existential types in arguments are approximated by their lower bound.
The type arguments of this type's base type instance wrt.base
.
Existential types in arguments are approximated by their lower bound.
The base classes of this type as determined by ClassDenotation in linearization order, with the class itself as first element. For AndTypes/OrTypes, the...
The base classes of this type as determined by ClassDenotation
in linearization order, with the class itself as first element.
For AndTypes/OrTypes, the union/intersection of the operands' baseclasses.
Inherited by all type proxies. Nil
for all other types.
The basetype TypeRef of this type with given class symbol, but without including any type arguments
The basetype TypeRef of this type with given class symbol, but without including any type arguments
The base type including all type arguments and applicable refinements of this type. Refinements are applicable if they refine a member of the parent typ...
The base type including all type arguments and applicable refinements of this type. Refinements are applicable if they refine a member of the parent type which furthermore is not a name-mangled type parameter. Existential types in arguments are returned as TypeBounds instances.
This type seen as a TypeBounds
This type seen as a TypeBounds
The least class or trait of which this type is a subtype or parameterized instance, or NoSymbol if none exists (either because this type is not a value...
The least class or trait of which this type is a subtype or parameterized instance, or NoSymbol if none exists (either because this type is not a value type, or because superclasses are ambiguous).
The least (wrt <:<) set of class symbols of which this type is a subtype
The least (wrt <:<) set of class symbols of which this type is a subtype
Eliminate anonymous classes
Eliminate anonymous classes
Follow aliases and dereferences LazyRefs, annotated types and instantiated TypeVars until type is no longer alias type, annotated type, LazyRef, or inst...
Follow aliases and dereferences LazyRefs, annotated types and instantiated TypeVars until type is no longer alias type, annotated type, LazyRef, or instantiated type variable.
Follow aliases and dereferences LazyRefs and instantiated TypeVars until type is no longer alias type, LazyRef, or instantiated type variable. Goes thro...
Follow aliases and dereferences LazyRefs and instantiated TypeVars until type is no longer alias type, LazyRef, or instantiated type variable. Goes through annotated types and rewraps annotations on the result.
A denotation containing the declaration(s) in this type with the given name. The result is either a SymDenotation or a MultiDenotation of SymDenotation...
A denotation containing the declaration(s) in this type with the given name. The result is either a SymDenotation or a MultiDenotation of SymDenotations. The info(s) are the original symbol infos, no translation takes place.
The scope of all declarations of this type. Defined by ClassInfo, inherited by type proxies. Empty scope for all other types.
The scope of all declarations of this type. Defined by ClassInfo, inherited by type proxies. Empty scope for all other types.
Widen from constant type to its underlying non-constant base type.
Widen from constant type to its underlying non-constant base type.
If this is a prototype with some ignored component, reveal one more layer of it. Otherwise the type itself.
If this is a prototype with some ignored component, reveal one more layer of it. Otherwise the type itself.
Is this type an instance of a non-bottom subclass of the given class cls
?
Is this type an instance of a non-bottom subclass of the given class cls
?
If this is a type alias, its underlying type, otherwise the type itself
If this is a type alias, its underlying type, otherwise the type itself
The element type of a sequence or array
The element type of a sequence or array
If self is not higher-kinded, eta expand it.
If self is not higher-kinded, eta expand it.
Is this type different from NoType?
Is this type different from NoType?
Returns true if there is a part of this type that satisfies predicate p
.
Returns true if there is a part of this type that satisfies predicate p
.
Returns true if there is a part of this type that satisfies predicate p
.
Returns true if there is a part of this type that satisfies predicate p
.
The final result type of a PolyType, MethodType, or ExprType, after skipping all parameter sections, the type itself for all others.
The final result type of a PolyType, MethodType, or ExprType, after skipping all parameter sections, the type itself for all others.
A denotation containing the declaration(s) in this type with the given
name, as seen from prefix type pre
. Declarations that have a flag
in excluded
are...
A denotation containing the declaration(s) in this type with the given
name, as seen from prefix type pre
. Declarations that have a flag
in excluded
are omitted.
Find member of this type with given name and
produce a denotation that contains the type of the member
as seen from given prefix pre
. Exclude all member...
Find member of this type with given name and
produce a denotation that contains the type of the member
as seen from given prefix pre
. Exclude all members that have
flags in excluded
from consideration.
The parameter types in the first parameter section of a generic type or MethodType, Empty list for others
The parameter types in the first parameter section of a generic type or MethodType, Empty list for others
The first parent of this type, AnyRef if list of parents is empty
The first parent of this type, AnyRef if list of parents is empty
Returns true if all parts of this type satisfy predicate p
.
Returns true if all parts of this type satisfy predicate p
.
Performs operation on all parts of this type
Performs operation on all parts of this type
Performs operation on all parts of this type
Performs operation on all parts of this type
Is this type a subtype of that type?
Is this type a subtype of that type?
the self type of the underlying classtype
the self type of the underlying classtype
Does the type carry an annotation that is an instance of cls
?
Does the type carry an annotation that is an instance of cls
?
Does this type have an UnsafeNonvariant annotation on one of its parts?
Does this type have an UnsafeNonvariant annotation on one of its parts?
customized hash code of this type. NotCached for uncached types. Cached types compute hash and use it as the type's hashCode.
customized hash code of this type. NotCached for uncached types. Cached types compute hash and use it as the type's hashCode.
If self
is a higher-kinded type, its type parameters, otherwise Nil
If self
is a higher-kinded type, its type parameters, otherwise Nil
The set of implicit members of this type
The set of implicit members of this type
Is this an alias TypeBounds?
Is this an alias TypeBounds?
Is this type a (neither aliased nor applied) reference to class sym
?
Is this type a (neither aliased nor applied) reference to class sym
?
Is some part of this type produced as a repair for an error?
Is some part of this type produced as a repair for an error?
Is this type produced as a repair for an error?
Is this type produced as a repair for an error?
Is self type higher-kinded (i.e. of kind != "*")?
Is self type higher-kinded (i.e. of kind != "*")?
Is this type guaranteed not to have null
as a value?
For the moment this is only true for modules, but it could
be refined later.
Is this type guaranteed not to have null
as a value?
For the moment this is only true for modules, but it could
be refined later.
Is this the type of a method with a leading empty parameter list?
Is this the type of a method with a leading empty parameter list?
Is this either not a method at all, or a parameterless method?
Is this either not a method at all, or a parameterless method?
Is this type a (possibly refined or applied or aliased) type reference to the given type symbol?
Is this type a (possibly refined or applied or aliased) type reference to the given type symbol?
Is this a type of a repeated parameter?
Is this a type of a repeated parameter?
Does this type denote a stable reference (i.e. singleton type)?
Does this type denote a stable reference (i.e. singleton type)?
Does this type refer exactly to class symbol sym
, instead of to a subclass of sym
?
Implemented like isRef
, but follows more types: all type proxies as...
Does this type refer exactly to class symbol sym
, instead of to a subclass of sym
?
Implemented like isRef
, but follows more types: all type proxies as well as and- and or-types
Does this type carry an UnsafeNonvariant annotation?
Does this type carry an UnsafeNonvariant annotation?
Is this type a primitive value type which can be widened to the primitive value type that
?
Is this type a primitive value type which can be widened to the primitive value type that
?
Is this type a value type?
Is this type a value type?
Is the is value type or type lambda?
Is the is value type or type lambda?
Is this the type of a method that has a repeated parameter type as last parameter type?
Is this the type of a method that has a repeated parameter type as last parameter type?
If this normalizes* to a refinement type that has a refinement for name
(which might be followed
by other refinements), and the refined info is a type...
P { type T = String, type R = P{...}.T } # R --> String
If this normalizes* to a refinement type that has a refinement for name
(which might be followed
by other refinements), and the refined info is a type alias, return the alias,
otherwise return NoType. Used to reduce types of the form
P { ... type T = / += / -= U ... } # T
to just U. Does not perform the reduction if the resulting type would contain a reference to the "this" of the current refined type, except in the following situation
(1) The "this" reference can be avoided by following an alias. Example:
P { type T = String, type R = P{...}.T } # R --> String
(*) normalizes means: follow instantiated typevars and aliases.
Map function f
over elements of an AndType, rebuilding with function g
Map function f
over elements of an AndType, rebuilding with function g
Map function f
over elements of an OrType, rebuilding with function g
Map function f
over elements of an OrType, rebuilding with function g
Is this type close enough to that type so that members with the two types would override each other? This means: - Either both types are polytypes with t...
Is this type close enough to that type so that members with the two types 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 method types with =:=-equivalent(*) parameter types and matching result types after renaming corresponding parameter types if the method types are dependent. - Or both types are =:=-equivalent - Or phase.erasedTypes is false, and neither type takes term or type parameters.
(*) when matching with a Java method, we also regard Any and Object as equivalent parameter types.
This is the same as matches
except that it also matches => T with T and
vice versa.
This is the same as matches
except that it also matches => T with T and
vice versa.
The member of this type with the given name
The member of this type with the given name
The set of member classes of this type
The set of member classes of this type
The info of sym
, seen as a member of this type.
The info of sym
, seen as a member of this type.
The set of names of members of this type that pass the given name filter
when seen as members of pre
. More precisely, these are all
of members name
such...
The set of names of members of this type that pass the given name filter
when seen as members of pre
. More precisely, these are all
of members name
such that keepOnly(pre, name)
is true
.
The set of names of members of this type that pass the given name filter
when seen as members of pre
. More precisely, these are all
of members name
such...
The set of names of members of this type that pass the given name filter
when seen as members of pre
. More precisely, these are all
of members name
such that keepOnly(pre, name)
is true
.
The set of members of this type having at least one of requiredFlags
but none of excludedFlags
set
The set of members of this type having at least one of requiredFlags
but none of excludedFlags
set
The parts of this type which are type or term refs
The parts of this type which are type or term refs
The parts of this type which are type or term refs and which
satisfy predicate p
.
The parts of this type which are type or term refs and which
satisfy predicate p
.
The parts of this type which are type or term refs and which
satisfy predicate p
.
The parts of this type which are type or term refs and which
satisfy predicate p
.
The named type parameters declared or inherited by this type. These are all uninstantiated named type parameters of this type or one of its base types.
The named type parameters declared or inherited by this type. These are all uninstantiated named type parameters of this type or one of its base types.
A prefix-less refined this or a termRef to a new skolem symbol that has the given type as info.
A prefix-less refined this or a termRef to a new skolem symbol that has the given type as info.
The set of abstract type members of this type.
The set of abstract type members of this type.
A denotation containing the non-private declaration(s) in this type with the given name
A denotation containing the non-private declaration(s) in this type with the given name
The non-private member of this type with the given name.
The non-private member of this type with the given name.
The normalized prefix of this type is: For an alias type, the normalized prefix of its alias For all other named type and class infos: the prefix. Inheri...
The normalized prefix of this type is:
For an alias type, the normalized prefix of its alias
For all other named type and class infos: the prefix.
Inherited by all other type proxies.
NoType
for all other types.
If this is a FunProto or PolyProto, WildcardType, otherwise this.
If this is a FunProto or PolyProto, WildcardType, otherwise this.
Does this type occur as a part of type that
?
Does this type occur as a part of type that
?
This type, if it exists, otherwise that
type
This type, if it exists, otherwise that
type
Is this type a legal type for a member that overrides another
member of type that
? This is the same as <:<
, except that
the types ()T and => T are ident...
Is this type a legal type for a member that overrides another
member of type that
? This is the same as <:<
, except that
the types ()T and => T are identified, and T is seen as overriding
either type.
The parameter names of a PolyType or MethodType, Empty list for others
The parameter names of a PolyType or MethodType, Empty list for others
The parameter types of a PolyType or MethodType, Empty list for others
The parameter types of a PolyType or MethodType, Empty list for others
For a ClassInfo type, its parents, Inherited by all type proxies. Empty for all other types. Overwritten in ClassInfo, where parents is cached.
For a ClassInfo type, its parents, Inherited by all type proxies. Empty for all other types. Overwritten in ClassInfo, where parents is cached.
The full parent types, including all type arguments
The full parent types, including all type arguments
The resultType of a PolyType, MethodType, or ExprType, the type itself for others
The resultType of a PolyType, MethodType, or ExprType, the type itself for others
A cycle-safe version of appliedTo
where computing type parameters do not force
the typeconstructor. Instead, if the type constructor is completing, we...
A cycle-safe version of appliedTo
where computing type parameters do not force
the typeconstructor. Instead, if the type constructor is completing, we make
up hk type parameters matching the arguments. This is needed when unpickling
Scala2 files such as scala.collection.generic.Mapfactory
.
Dealias type if it can be done without forcing the TypeRef's info
Dealias type if it can be done without forcing the TypeRef's info
Safer version of &
.
This version does not simplify the upper bound of the intersection of
two TypeBounds. The simplification done by &
requires subtypin...
Safer version of &
.
This version does not simplify the upper bound of the intersection of
two TypeBounds. The simplification done by &
requires subtyping checks
which may end up calling &
again, in most cases this should be safe
but because of F-bounded types, this can result in an infinite loop
(which will be masked unless -Yno-deep-subtypes
is enabled).
The type <this . name> , reduced if possible
The type <this . name> , reduced if possible
The type <this . name> , reduced if possible, with given denotation if unreduced
The type <this . name> , reduced if possible, with given denotation if unreduced
The type <this . name> with given symbol, reduced if possible
The type <this . name> with given symbol, reduced if possible
Utility method to show the underlying type of a TypeProxy chain together with the proxy type itself.
Utility method to show the underlying type of a TypeProxy chain together with the proxy type itself.
Utility method to show the underlying type of a TypeProxy chain together with the proxy type itself.
Utility method to show the underlying type of a TypeProxy chain together with the proxy type itself.
The signature of this type. This is by default NotAMethod, but is overridden for PolyTypes, MethodTypes, and TermRefWithSignature types. (the reason why...
The signature of this type. This is by default NotAMethod, but is overridden for PolyTypes, MethodTypes, and TermRefWithSignature types. (the reason why we deviate from the "final-method-with-pattern-match-in-base-class" pattern is that method signatures use caching, so encapsulation is improved using an OO scheme).
A simplified version of this type which is equivalent wrt =:= to this type. This applies a typemap to the type which (as all typemaps) follows type vari...
A simplified version of this type which is equivalent wrt =:= to this type. This applies a typemap to the type which (as all typemaps) follows type variable instances and reduces typerefs over refined types. It also re-evaluates all occurrences of And/OrType with &/| because what was a union or intersection of type variables might be a simpler type after the type variables are instantiated. Finally, it maps poly params in the current constraint set back to their type vars.
Remove all AnnotatedTypes wrapping this type.
Remove all AnnotatedTypes wrapping this type.
Map a TypeVar to either its instance if it is instantiated, or its origin, if not, until the result is no longer a TypeVar. Identity on all other types...
Map a TypeVar to either its instance if it is instantiated, or its origin, if not, until the result is no longer a TypeVar. Identity on all other types.
Substitute all types that refer in their symbol attribute to
one of the symbols in from
by the corresponding types in to
.
Substitute all types that refer in their symbol attribute to
one of the symbols in from
by the corresponding types in to
.
Substitute all types of the form PolyParam(from, N)
by
PolyParam(to, N)
.
Substitute all types of the form PolyParam(from, N)
by
PolyParam(to, N)
.
Same as subst
but follows aliases as a fallback. When faced with a reference
to an alias type, where normal substitution does not yield a new type, the
Same as subst
but follows aliases as a fallback. When faced with a reference
to an alias type, where normal substitution does not yield a new type, the
substitution is instead applied to the alias. If that yields a new type,
this type is returned, otherwise the original type (not the alias) is returned.
A use case for this method is if one wants to substitute the type parameters
of a class and also wants to substitute any parameter accessors that alias
the type parameters.
Substitute a bound type by some other type
Substitute a bound type by some other type
Substitute bound types by some other types
Substitute bound types by some other types
Substitute all occurrences of RecThis(binder)
by tp
Substitute all occurrences of RecThis(binder)
by tp
Substitute all occurrences of symbols in from
by references to corresponding symbols in to
Substitute all occurrences of symbols in from
by references to corresponding symbols in to
Substitute all occurrences of This(cls)
by tp
Substitute all occurrences of This(cls)
by tp
As substThis, but only is class is a static owner (i.e. a globally accessible object)
As substThis, but only is class is a static owner (i.e. a globally accessible object)
The term symbol associated with the type
The term symbol associated with the type
Turn this type, which is used as an argument for
type parameter tparam
, into a TypeBounds RHS
Turn this type, which is used as an argument for
type parameter tparam
, into a TypeBounds RHS
Turn type into a function type.
Turn type into a function type.
Turn type into a function type.
Turn type into a function type.
Convert to text
Convert to text
Translate a type of the form From[T] to To[T], keep other types as they are.
from
and to
must be static classes, both with one type parameter, and the same...
[T][T]
Translate a type of the form From[T] to To[T], keep other types as they are.
from
and to
must be static classes, both with one type parameter, and the same variance.
Do the same for by name types => From[T] and => To[T]
The set of type members of this type
The set of type members of this type
The type parameter with given name
. This tries first decls
in order not to provoke a cycle by forcing the info. If that yields
no symbol it tries member
The type parameter with given name
. This tries first decls
in order not to provoke a cycle by forcing the info. If that yields
no symbol it tries member
as an alternative.
If self
is a generic class, its type parameter symbols, otherwise Nil
If self
is a generic class, its type parameter symbols, otherwise Nil
The type parameters of this type are: For a ClassInfo type, the type parameters of its class. For a typeref referring to a class, the type parameters of...
The type parameters of this type are:
For a ClassInfo type, the type parameters of its class.
For a typeref referring to a class, the type parameters of the class.
For a typeref referring to a Lambda class, the type parameters of
its right hand side or upper bound.
For a refinement type, the type parameters of its parent, dropping
any type parameter that is-rebound by the refinement. "Re-bind" means:
The refinement contains a TypeAlias for the type parameter, or
it introduces bounds for the type parameter, and we are not in the
special case of a type Lambda, where a LambdaTrait gets refined
with the bounds on its hk args. See LambdaAbstract
, where these
types get introduced, and see isBoundedLambda
below for the test.
The type symbol associated with the type
The type symbol associated with the type
If this is a (possibly aliased, annotated, and/or parameterized) reference to a class, the class type ref, otherwise NoType.
If this is a (possibly aliased, annotated, and/or parameterized) reference to a class, the class type ref, otherwise NoType.
Useful for diagnostics: The underlying type if this type is a type proxy, otherwise NoType
Useful for diagnostics: The underlying type if this type is a type proxy, otherwise NoType
If this is repeated parameter type, its underlying Seq type, or, if isJava is true, Array type, else the type itself.
If this is repeated parameter type, its underlying Seq type, or, if isJava is true, Array type, else the type itself.
The iterator of underlying types as long as type is a TypeProxy. Useful for diagnostics
The iterator of underlying types as long as type is a TypeProxy. Useful for diagnostics
Widen from singleton type to its underlying non-singleton
base type by applying one or more underlying
dereferences,
Also go from => T to T.
Identity for...
Widen from singleton type to its underlying non-singleton
base type by applying one or more underlying
dereferences,
Also go from => T to T.
Identity for all other types. Example:
class Outer { class C ; val x: C } def o: Outer <o.x.type>.widen = o.C
Perform successive widenings and dealiasings until none can be applied anymore
Perform successive widenings and dealiasings until none can be applied anymore
Widen from ExprType type to its result type. (Note: no stripTypeVar needed because TypeVar's can't refer to ExprTypes.)
Widen from ExprType type to its result type. (Note: no stripTypeVar needed because TypeVar's can't refer to ExprTypes.)
Widen type if it is unstable (i.e. an ExprType, or TermRef to unstable symbol
Widen type if it is unstable (i.e. an ExprType, or TermRef to unstable symbol
Widen from singleton type to its underlying non-singleton
base type by applying one or more underlying
dereferences.
Widen from singleton type to its underlying non-singleton
base type by applying one or more underlying
dereferences.
If this is a skolem, its underlying type, otherwise the type itself
If this is a skolem, its underlying type, otherwise the type itself
Widen from TermRef to its underlying non-termref base type, while also skipping Expr types.
Widen from TermRef to its underlying non-termref base type, while also skipping Expr types.
The smallest supertype of this type that instantiated none of the named type parameters
in params
. That is, for each named type parameter p
in params
,...
The smallest supertype of this type that instantiated none of the named type parameters
in params
. That is, for each named type parameter p
in params
, either there is
no type field named p
in this type, or p
is a named type parameter of this type.
The first case is important for the recursive case of AndTypes, because some of their operands might
be missing the named parameter altogether, but the AndType as a whole can still
contain it.
The core type without any type arguments.
The core type without any type arguments.