This class declares methods that are visible in a CompoundType (i.e.
This class declares methods that are visible in a CompoundType (i.e.
a class/trait/object template or refined type of the form
P_1 with ... with P_m { D_1; ...; D_n }
P_n
This class declares methods that are visible in a SingleType.
This class declares methods that are visible in a SingleType.
This class declares operations that are visible in a Type.
This class declares operations that are visible in a Type.
A type carrying some annotations.
A type carrying some annotations. Created by the typechecker when eliminating Annotated trees (see typedAnnotated).
the list of annotations on the type
the type without the annotation
a "self" symbol with type underlying;
only available if -Yself-in-annots is turned on. Can be NoSymbol
if it is not used.
A class representing a class info
An extractor class to create and pattern match with syntax ClassInfo(parents, decls, clazz)
Here, parents is the list of parent types of the class, decls is the scope
containing all declarations in the class, and clazz is the symbol of the class
itself.
An extractor class to create and pattern match with syntax ClassInfo(parents, decls, clazz)
Here, parents is the list of parent types of the class, decls is the scope
containing all declarations in the class, and clazz is the symbol of the class
itself.
A common base class for intersection types and class types
A class representing a constant type.
A class representing a constant type.
...
An extractor class to create and pattern match with syntax ConstantType(constant)
Here, constant is the constant value represented by the type.
An extractor class to create and pattern match with syntax ConstantType(constant)
Here, constant is the constant value represented by the type.
A class representing a method type with parameters.
A class representing a method type with parameters. Note that a parameterless method is represented by a NullaryMethodType:
def m(): Int MethodType(Nil, Int) def m: Int NullaryMethodType(Int)
An extractor class to create and pattern match with syntax MethodType(params, respte)
Here, params is a potentially empty list of parameter symbols of the method,
and restpe is the result type of the method.
An extractor class to create and pattern match with syntax MethodType(params, respte)
Here, params is a potentially empty list of parameter symbols of the method,
and restpe is the result type of the method. If the method is curried, restpe would
be another MethodType.
Note: MethodType(Nil, Int) would be the type of a method defined with an empty parameter list.
def f(): Int
If the method is completely parameterless, as in
def f: Int
its type is a NullaryMethodType.
A class representing types with a name.
A class representing types with a name. When an application uses named arguments, the named argument types for calling isApplicable are represented as NamedType.
A class containing the alternatives and type prefix of an overloaded symbol.
A class containing the alternatives and type prefix of an overloaded symbol.
Not used after phase typer.
A class representing a path dependent type
A type function or the type of a polymorphic value (and thus of kind *).
A type function or the type of a polymorphic value (and thus of kind *).
Before the introduction of NullaryMethodType, a polymorphic nullary method (e.g, def isInstanceOf[T]: Boolean) used to be typed as PolyType(tps, restpe), and a monomorphic one as PolyType(Nil, restpe) This is now: PolyType(tps, NullaryMethodType(restpe)) and NullaryMethodType(restpe) by symmetry to MethodTypes: PolyType(tps, MethodType(params, restpe)) and MethodType(params, restpe)
Thus, a PolyType(tps, TypeRef(...)) unambiguously indicates a type function (which results from eta-expanding a type constructor alias). Similarly, PolyType(tps, ClassInfoType(...)) is a type constructor.
A polytype is of kind * iff its resultType is a (nullary) method type.
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.
An extractor class to create and pattern match with syntax RefinedType(parents, decls)
Here, parents is the list of parent types of the class, and decls is the scope
containing all declarations in the class.
An extractor class to create and pattern match with syntax RefinedType(parents, decls)
Here, parents is the list of parent types of the class, and decls is the scope
containing all declarations in the class.
A proxy for a type (identified by field underlying) that forwards most
operations to it (for exceptions, see WrappingProxy, which forwards even more operations).
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>.<sym.name>.type.
A class for singleton types of the form <prefix>.<sym.name>.type.
Cannot be created directly; one should always use singleType for creation.
An extractor class to create and pattern match with syntax SingleType(pre, sym)
Here, pre is the prefix of the single-type, and sym is the stable value symbol
referred to by the single-type.
An extractor class to create and pattern match with syntax SingleType(pre, sym)
Here, pre is the prefix of the single-type, and sym is the stable value symbol
referred to by the single-type.
A base class for types that defer some operations to their immediate supertype.
An extractor class to create and pattern match with syntax SingleType(thistpe, supertpe)
An extractor class to create and pattern match with syntax SingleType(thistpe, supertpe)
A class for this-types of the form <sym>.this.type
An extractor class to create and pattern match with syntax ThisType(sym)
where sym is the class prefix of the this type.
An extractor class to create and pattern match with syntax ThisType(sym)
where sym is the class prefix of the this type.
The base class for all types
A class for the bounds of abstract types and type parameters
An extractor class to create and pattern match with syntax TypeBound(lower, upper)
Here, lower is the lower bound of the TypeBounds pair, and upper is
the upper bound.
An extractor class to create and pattern match with syntax TypeBound(lower, upper)
Here, lower is the lower bound of the TypeBounds pair, and upper is
the upper bound.
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
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 for named types of the form
<prefix>.<sym.name>[args]
Cannot be created directly; one should always use typeRef
for creation.
...
...
...
An extractor class to create and pattern match with syntax TypeRef(pre, sym, args)
Here, pre is the prefix of the type reference, sym is the symbol
referred to by the type reference, and args is a possible empty list of
type argumenrts.
An extractor class to create and pattern match with syntax TypeRef(pre, sym, args)
Here, pre is the prefix of the type reference, sym is the symbol
referred to by the type reference, and args is a possible empty list of
type argumenrts.
A class representing a type variable: not used after phase typer.
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.
The constructor/deconstructor for ClassInfoType instances.
The constructor/deconstructor for ConstantType instances.
An object representing an erroneous type
The constructor/deconstructor for MethodType instances.
An object representing a non-existing prefix
An object representing a non-existing type
The constructor/deconstructor for RefinedType instances.
The constructor/deconstructor for SingleType instances.
The constructor/deconstructor for SuperType instances.
The constructor/deconstructor for ThisType instances.
The constructor/deconstructor for TypeBounds instances.
The constructor/deconstructor for TypeRef instances.
An object representing an unknown type, used during type inference.
An object representing an unknown type, used during type inference. If you see WildcardType outside of inference it is almost certainly a bug.
Creator for AnnotatedTypes.
Creator for AnnotatedTypes. It returns the underlying type if annotations.isEmpty rather than walking into the assertion.
A creator for type applications
Again avoiding calling length, but the lengthCompare interface is clunky.
The maximum number of recursions allowed in toString
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