This class declares methods that are visible in a CompoundType (i.
This class declares methods that are visible in a SingleType.
This class declares operations that are visible in a Type.
Alternatives of patterns, eliminated by explicitouter, except for occurrences in encoded Switch stmt (=remaining Match(CaseDef(.
A tree that has an annotation attached to it.
A type carrying some annotations.
Typed information about an annotation.
Applied type <tpt> [ <args> ], eliminated by RefCheck
Value application
Dynamic value application.
Array of expressions, needs to be translated in backend,
Assignment
Bind of a variable to a rhs pattern, eliminated by explicitouter
Block of expressions (semicolon separated expressions)
Case clause in a pattern match, eliminated during explicitouter (except for occurrences in switch statements)
A class definition.
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.
A class for class symbols
Arguments to classfile annotations (which are written to bytecode as java annotations) are either:
Commented expression
A common base class for intersection types and class types
Intersection type <parent1> with .
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.
A method or macro definition.
A tree which defines a symbol-carrying entity.
A tree for a function expression.
Anonymous function, eliminated by analyzer
Common base class for Apply and TypeApply.
Identifier <name>
Conditional expression
A common base class for class and object definitions.
Import clause
Import selector
Infix application
Infix extraction, for example case x :: rest
This should be the first trait in the linearization.
A labelled expression.
Literal
Represents a compile-time Constant (Boolean, Byte, Short,
Char, Int, Long, Float, Double, String, java.lang.Class or
an instance of a Java enumeration value).
- Pattern matching expression (before explicitouter)
Common base class for all member definitions: types, classes, objects, packages, vals and vars, defs.
A class for method symbols
A class representing a method type with parameters.
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.
A class for module class symbols Note: Not all module classes are of this type; when unpickled, we get plain class symbols!
An object definition, e.
A class for module symbols
A class representing types with a name.
Object instantiation One should always use factory method below to build a user level new.
A class containing the alternatives and type prefix of an overloaded symbol.
A packaging, such as package pid { stats }
A class representing a path dependent type
A type function or the type of a polymorphic value (and thus of kind *).
A tree which references a symbol-carrying entity.
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.
Return expression
Designator <qualifier> .
Type selection <qualifier> # <name>, eliminated by RefCheck
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 class for singleton types of the form <prefix>.<sym.name>.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.
The type of Scala singleton types, i.
Singleton type, eliminated by RefCheck
Repetition of pattern, eliminated by explicitouter
A base class for types that defer some operations to their immediate supertype.
Super reference, qual = corresponding this reference
The SuperType type is not directly written, but arises when C.super is used
as a prefix in a TypeRef or SingleType.
An extractor class to create and pattern match with syntax SingleType(thistpe, supertpe)
A tree with a mutable symbol field, initialized to NoSymbol.
Instantiation template of a class or trait
A class for term symbols
A tree for a term.
Self reference
A class for this-types of the form <sym>.
An extractor class to create and pattern match with syntax ThisType(sym)
where sym is the class prefix of the this type.
Throw expression
Tree is the basis for scala's abstract syntax.
A tree for a type.
The base class for all types
Explicit type application.
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.
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
An abstract type, a type parameter, or a type alias.
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.
A synthetic tree holding an arbitrary type.
A class representing a type variable: not used after phase typer.
Type annotation, eliminated by explicit outer
A constant value definition (this includes vars as well, which differ from vals only in having the MUTABLE flag set in their Modifiers.
A common base class for ValDefs and DefDefs.
Block factory that flattens directly nested blocks.
Block factory that flattens directly nested blocks.
casedef shorthand
casedef shorthand
The constructor/deconstructor for ClassInfoType instances.
A writer that writes to the current Console and is sensitive to replacement of the Console's output stream.
The constructor/deconstructor for ConstantType instances.
The empty scope (immutable).
The empty scope (immutable).
The empty tree
An object representing an erroneous type
A TypeDef node which defines abstract type or type parameter for given sym
A TypeDef node which defines abstract type or type parameter for given sym
The constructor/deconstructor for MethodType instances.
the class symbol
the implementation template
0-1 argument list new, based on a symbol.
0-1 argument list new, based on a symbol.
Factory method for object creation new tpt(args_1)...(args_n)
A New(t, as) is expanded to: (new t).<init>(as)
Factory method for object creation new tpt(args_1)...(args_n)
A New(t, as) is expanded to: (new t).<init>(as)
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.
A TypeDef node which defines given sym with given tight hand side rhs.
A TypeDef node which defines given sym with given tight hand side rhs.
The constructor/deconstructor for TypeRef instances.
An object representing an unknown type, used during type inference.
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
A creator for type applications
Turns a path into a String, introducing backquotes as necessary.
Turns a path into a String, introducing backquotes as necessary.
Again avoiding calling length, but the lengthCompare interface is clunky.
Again avoiding calling length, but the lengthCompare interface is clunky.
The maximum number of recursions allowed in toString
The maximum number of recursions allowed in toString
Cast tree to pt, unless tpe is a subtype of pt, or pt is Unit.
Cast tree to pt, unless tpe is a subtype of pt, or pt is Unit.
If this is a reference to a method with an empty parameter list, wrap it in an apply.
If this is a reference to a method with an empty parameter list, wrap it in an apply.
Builds a cast with given value and type.
Builds a cast with given value and type.
Builds a reference to value whose type is given stable prefix.
Builds a reference to value whose type is given stable prefix. If the type is unsuitable, e.g. it is a TypeRef for an abstract type variable, then an Ident will be made using termSym as the Ident's symbol. In that case, termSym must not be NoSymbol.
Builds a reference to value whose type is given stable prefix.
Builds a reference to value whose type is given stable prefix. The type must be suitable for this. For example, it must not be a TypeRef pointing to an abstract type variable.
Builds a reference to given symbol.
Builds a reference to given symbol.
Builds a reference to given symbol with given stable prefix.
Builds a reference to given symbol with given stable prefix.
Builds a reference with stable type to given symbol
Builds a reference with stable type to given symbol
Cast tree to type pt
Cast tree to type pt
Apparently we smuggle a Type around as a Literal(Constant(tp)) and the implementation of Constant#tpe is such that x.
Apparently we smuggle a Type around as a Literal(Constant(tp)) and the implementation of Constant#tpe is such that x.tpe becomes ClassType(value.asInstanceOf[Type]), i.e. java.lang.Class[Type]. Can't find any docs on how/why it's done this way. See ticket SI-490 for some interesting comments from lauri alanko suggesting that the type given by classOf[T] is too strong and should be weakened so as not to suggest that classOf[List[String]] is any different from classOf[List[Int]].
!!! See deconstMap in Erasure for one bug this encoding has induced: I would be very surprised if there aren't more.
Builds an instance test with given value and type.
Builds an instance test with given value and type.
A creator for method calls, e.
A creator for method calls, e.g. fn[T1, T2, ...](v1, v2, ...) There are a number of variations.
symbol of the method receiver
name of the method to call
type arguments (if Nil, no TypeApply node will be generated)
value arguments
the newly created trees.
Builds a list with given head and tail.
Builds a list with given head and tail.
Builds a list with given head and tail.
Builds a list with given head and tail.
Builds a tuple
Builds a tuple
Builds a type application node if args.
Builds a type application node if args.nonEmpty, returns fun otherwise.
Builds an untyped reference to given symbol.
Builds an untyped reference to given symbol.
Builds a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.
Builds a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.
Create a new scope
Hook to define what show(tree) means.
Hook to define what show(tree) means.
Adds backticks if the name is a scala keyword.
Adds backticks if the name is a scala keyword.
the canonical creator for a refined type with a given 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 canonical creator for single-types
Hook for extensions
Hook for extensions