A type carrying some annotations.
A class remembering a type instantiation for some a set of overloaded polymorphic symbols.
A map to compute the asSeenFrom method
A class representing a class info
A common base class for intersection types and class types
A class representing a constant type.
A map to implement the contains' method
A map to implement the contains' method
A collector that tests for existential types appearing at given variance in a type
A map to implement the filter' method
A map to implement the filter' method
A class representing an as-yet unevaluated type.
A throwable signalling a malformed type
A class representing a method type with parameters.
A class representing types with a name.
A class containing the alternatives and type prefix of an overloaded symbol.
A type function or the type of a polymorphic value (and thus of kind *).
A class representing intersection types with refinements of the form
<parents_0> with ... with <parents_n> { decls }'
Cannot be created directly;
one should always use
refinedType' for creation.
A proxy for a type (identified by field underlying') that forwards most
operations to it. Every operation that is overridden for some kind of types is
forwarded here. Some operations are rewrapped again.
A proxy for a type (identified by field underlying') that forwards most
operations to it (for exceptions, see WrappingProxy, which forwards even more operations).
every operation that is overridden for some kind of types should be forwarded.
A class for singleton types of the form <prefix>.
A base class for types that represent a single value (single-types and this-types).
A base class for types that defer some operations to their immediate supertype.
A base class to compute all substitutions
A map to implement the substSym' method.
A map to implement the substThis' method.
A map to implement the subst' method.
A class for this-types of the form <sym>.
The base class for all types
A class for the bounds of abstract types and type parameters
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
A throwable signalling a type error
A prototype for mapping a function over all possible types
A class for named types of the form
<prefix>.<sym.name>[args]'
Cannot be created directly; one should always use
typeRef'
for creation.
A class representing a type variable
Not used after phase typer'.
A higher-kinded type variable has type arguments (a list of Type's) and type parameters (list of Symbols)
A TypeVar whose list of args is non-empty can only be instantiated by a higher-kinded type that can be applied to these args
a typevar is much like a typeref, except it has special logic for type equality/subtyping
An exception signalling a variance annotation/usage conflict
A map to implement the contains' method
An object representing an erroneous type
A type map that always returns the input type unchanged
The canonical creator for implicit method types
An object representing a non-existing prefix
An object representing a non-existing type
An object representing an unknown type, used during type inference.
Make symbol sym' a member of scope
tp.
Make symbol sym' a member of scope
tp.decls'
where thistp' is the narrowed owner type of the scope.
A creator for type applications
Does this type have a prefix that begins with a type variable, or is it a refinement type? For type prefixes that fulfil this condition, type selections with the same name of equal (wrt) =:= prefixes are considered equal wrt =:=
Check well-kindedness of type application (assumes arities are already checked) -- @M
Check well-kindedness of type application (assumes arities are already checked) -- @M
This check is also performed when abstract type members become concrete (aka a "type alias") -- then tparams.length==1 (checked one type member at a time -- in that case, prefix is the name of the type alias)
Type application is just like value application: it's "contravariant" in the sense that the type parameters of the supplied type arguments must conform to the type parameters of the required type parameters:
e.g. class Iterable[t, m[+x <: t]] --> the application Iterable[Int, List] is okay, since List's type parameter is also covariant and its bounds are weaker than <: Int
A map to compute the most deeply nested owner that contains all the symbols of thistype or prefixless typerefs/singletype occurrences in given type.
Create a new MethodType of the same class as tp, i.
Create a new MethodType of the same class as tp, i.e. keep JavaMethodType
True if all three arguments have the same number of elements and the function is true for all the triples.
True if all three arguments have the same number of elements and the function is true for all the triples.
Remove any occurrences of type aliases from this type
Remove any occurrence of type <singleton> from this type and its parents
A creator for existential types.
A creator for existential types. This generates:
tpe1 where { tparams }
where tpe1' is the result of extrapolating
tpe' wrt to tparams'. Extrapolating means
that type variables in
tparams' occurring in covariant positions are replaced by upper bounds,
(minus any SingletonClass markers),
type variables in tparams' occurring in contravariant positions are replaced by upper bounds,
provided the resulting type is legal wrt to stability, and does not contain any
type variable in
tparams'.
The abstraction drops all type parameters that are not directly or indirectly
referenced by type tpe1'.
If there are no remaining type parameters, simply returns result type
tpe'.
If option explaintypes' is set, print a subtype trace for
op(found, required)'.
If option explaintypes' is set, print a subtype trace for
found <:< required'.
Again avoiding calling length, but the lengthCompare interface is clunky.
Again avoiding calling length, but the lengthCompare interface is clunky.
A creator for intersection type where intersections of a single type are replaced by the type itself.
A creator for intersection type where intersections of a single type are replaced by the type itself, and repeated parent classes are merged.
A map from lists to compound types that have the given list as parents.
A map from lists to compound types that have the given list as parents. This is used to avoid duplication in the computation of base type sequences and baseClasses. It makes use of the fact that these two operations depend only on the parents, not on the refinement.
Is intersection of given types populated? That is, for all types tp1, tp2 in intersection for all common base classes bc of tp1 and tp2 let bt1, bt2 be the base types of tp1, tp2 relative to class bc Then: bt1 and bt2 have the same prefix, and any corresponding non-variant type arguments of bt1 and bt2 are the same
Is type tp a raw type?
Do tp1' and
tp2' denote equivalent types?
Are tps1' and
tps2' lists of pairwise equivalent
types?
Are tps1' and
tps2' lists of equal length such
that all elements of tps1' conform to corresponding elements
of
tps2'?
Do type arguments targs' conform to formal parameters
tparams'?
Do type arguments targs' conform to formal parameters
tparams'?
...
...
...
The least upper bound wrt <:< of a list of types
The maximum allowable depth of lubs or glbs over types ts'
This is the maximum depth of all types in the base type sequences
of each of the types
ts', plus LubGlbMargin
like map2, but returns list xs' itself - instead of a copy - if function
f' maps all elements to themselves.
A function implementing tp1' matches
tp2'
A function implementing tp1' matches
tp2'
Compute lub (if variance == 1) or glb (if variance == -1) of given list
of types tps'. All types in
tps' are typerefs or singletypes
with the same symbol.
Compute lub (if variance == 1) or glb (if variance == -1) of given list
of types tps'. All types in
tps' are typerefs or singletypes
with the same symbol.
Return Some(x)' if the computation succeeds with result
x'.
Return None' if the computation fails.
Does a pattern of type patType' need an outer test when executed against
selector type
selType' in context defined by currentOwner'?
A creator for type parameterizations that strips empty type parameter lists.
A creator for type parameterizations that strips empty type parameter lists. Use this factory method to indicate the type has kind * (it's a polymorphic value) until we start tracking explicit kinds equivalent to typeFun (except that the latter requires tparams nonEmpty)
The raw to existential map converts a raw type to an existential type.
It is necessary because we might have read a raw type of a
parameterized Java class from a class file. At the time we read the type
the corresponding class file might still not be read, so we do not
know what the type parameters of the type are. Therefore
the conversion of raw types to existential types might not have taken place
in ClassFileparser.sigToType (where it is usually done)
The canonical creator for a refined type with an initially empty scope.
The canonical creator for a refined type with an initially empty scope.
...
...
...
the canonical creator for a refined type with a given scope
True if two lists have the same length.
True if two lists have the same length. Since calling length on linear sequences is O(n), it is an inadvisable way to test length equality.
The canonical creator for single-types
The current skolemization level, needed for the algorithms in isSameType, isSubType that do constraint solving under a prefix
Solve constraint collected in types tvars'.
Solve constraint collected in types tvars'.
All type variables to be instantiated.
The type parameters corresponding to tvars'
The variances of type parameters; need to reverse solution direction for all contravariant variables.
When true' search for max solution else min.
A minimal type list which has a given list of types as its base type sequence
Does type tp' implement symbol
sym' with same or
stronger type? Exact only if sym' is a member of some
refinement type, otherwise we might return false negatives.
A creator for a type functions, assuming the type parameters tps already have the right owner
A creator for anonymous type functions, where the symbol for the type function still needs to be created
A creator for anonymous type functions, where the symbol for the type function still needs to be created
TODO: type params of anonymous type functions, which currently can only arise from normalising type aliases, are owned by the type alias of which they are the eta-expansion higher-order subtyping expects eta-expansion of type constructors that arise from a class; here, the type params are owned by that class, but is that the right thing to do?
The canonical creator for typerefs todo: see how we can clean this up a bit
A map to convert every occurrence of a type variable to a wildcard type
A log of type variable with their original constraints.
A map to convert every occurrence of a wildcard type to a fresh type variable
Execute op' while printing a trace of the operations on types executed.