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.
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
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.
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 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 a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.
Replaces tree type with a stable type if possible
Computes stable type for a tree if possible