Constructors
Members
If tree is a variable pattern, return its name and type, otherwise return None.
If tree is a variable pattern, return its name and type, otherwise return None.
Info of a variable in a pattern: The named tree and its type
Info of a variable in a pattern: The named tree and its type
Tags a .withFilter call generated by desugaring a for expression. Such calls can alternatively be rewritten to use filter.
Tags a .withFilter call generated by desugaring a for expression. Such calls can alternatively be rewritten to use filter.
{ stats;
{ stats;
The name of mdef
, after checking that it does not redefine a Scala core class.
If it does redefine, issue an error and return a mangled name instead of...
The name of mdef
, after checking that it does not redefine a Scala core class.
If it does redefine, issue an error and return a mangled name instead of the original one.
The expansion of a class definition. See inline comments for what is involved
The expansion of a class definition. See inline comments for what is involved
Expand context bounds to evidence params. E.g.,
def f[T >: L <: H : B](params)
==> def fT >: L <: H(implicit evidence$0: B[T])
Expand default arguments to default getters. E.g,
def f[T: B](x: Int = 1)(y: String = x + "m") = ...
==> def f[T](...[T] [T] [T]
Expand context bounds to evidence params. E.g.,
def f[T >: L <: H : B](params)
==> def fT >: L <: H(implicit evidence$0: B[T])
Expand default arguments to default getters. E.g,
def f[T: B](x: Int = 1)(y: String = x + "m") = ...
==> def f[T](x: Int)(y: String)(implicit evidence$0: B[T]) = ... def f$default$1[T] = 1 def f$default$2[T](x: Int) = x + "m"
Expand context bounds to evidence params. E.g.,
def f[T >: L <: H : B](params)
==> def fT >: L <: H(implicit evidence$0: B[T])
Expand default arguments to default getters. E.g,
def f[T: B](x: Int = 1)(y: String = x + "m") = ...
==> def f[T](...[T] [T] [T]
Expand context bounds to evidence params. E.g.,
def f[T >: L <: H : B](params)
==> def fT >: L <: H(implicit evidence$0: B[T])
Expand default arguments to default getters. E.g,
def f[T: B](x: Int = 1)(y: String = x + "m") = ...
==> def f[T](x: Int)(y: String)(implicit evidence$0: B[T]) = ... def f$default$1[T] = 1 def f$default$2[T](x: Int) = x + "m"
A value definition copied from vdef
with a tpt typetree derived from it
A value definition copied from vdef
with a tpt typetree derived from it
A type definition copied from tdef
with a rhs typetree derived from it
A type definition copied from tdef
with a rhs typetree derived from it
The implicit evidence parameters of meth
, as generated by desugar.defDef
The implicit evidence parameters of meth
, as generated by desugar.defDef
Returns list of all pattern variables, possibly with their types, without duplicates
Returns list of all pattern variables, possibly with their types, without duplicates
Names of methods that are added unconditionally to case classes
Names of methods that are added unconditionally to case classes
Add annotation to tree: tree @fullName
The annotation is usually represented as a TypeTree referring to the class
with the given name fullName
. However,...
Add annotation to tree: tree @fullName
The annotation is usually represented as a TypeTree referring to the class
with the given name fullName
. However, if the annotation matches a file name
that is still to be entered, the annotation is represented as a cascade of Selects
following fullName
. This is necessary so that we avoid reading an annotation from
the classpath that is also compiled from source.
If nparams
== 1, expand partial function
{ cases }
==> x$1 => (x$1 @unchecked) match { cases }
If nparams
!= 1, expand instead to
(x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }
If nparams
== 1, expand partial function
{ cases }
==> x$1 => (x$1 @unchecked) match { cases }
If nparams
!= 1, expand instead to
(x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }
If nparams
== 1, expand partial function
{ cases }
==> x$1 => (x$1 @unchecked) match { cases }
If nparams
!= 1, expand instead to
(x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }
If nparams
== 1, expand partial function
{ cases }
==> x$1 => (x$1 @unchecked) match { cases }
If nparams
!= 1, expand instead to
(x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }
If nparams
== 1, expand partial function
{ cases }
==> x$1 => (x$1 @unchecked) match { cases }
If nparams
!= 1, expand instead to
(x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }
If nparams
== 1, expand partial function
{ cases }
==> x$1 => (x$1 @unchecked) match { cases }
If nparams
!= 1, expand instead to
(x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }
Make closure corresponding to function. params => body ==> def $anonfun(params) = body Closure($anonfun)
If inlineable
is true, tag $anonfun with an @inlin...
Make closure corresponding to function. params => body ==> def $anonfun(params) = body Closure($anonfun)
If inlineable
is true, tag $anonfun with an @inline annotation.
Make closure corresponding to function. params => body ==> def $anonfun(params) = body Closure($anonfun)
If inlineable
is true, tag $anonfun with an @inlin...
Make closure corresponding to function. params => body ==> def $anonfun(params) = body Closure($anonfun)
If inlineable
is true, tag $anonfun with an @inline annotation.
If pat
is a variable pattern,
val/var/lazy val p = e
Otherwise, in case there is exactly one variable x_1 in pattern val/var/lazy val p = e ==> val/var...
[lazy]
If pat
is a variable pattern,
val/var/lazy val p = e
Otherwise, in case there is exactly one variable x_1 in pattern val/var/lazy val p = e ==> val/var/lazy val x_1 = (e: @unchecked) match (case p => (x_1))
in case there are zero or more than one variables in pattern val/var/lazy p = e ==> private synthetic [lazy] val t$ = (e: @unchecked) match (case p => (x_1, ..., x_N)) val/var/def x_1 = t$._1 ... val/var/def x_N = t$._N If the original pattern variable carries a type annotation, so does the corresponding ValDef or DefDef.
Map n-ary function (p1, ..., pn) => body
where n != 1 to unary function as follows:
x$1 => { def p1 = x$1._1 ... def pn = x$1._n body }
Map n-ary function (p1, ..., pn) => body
where n != 1 to unary function as follows:
x$1 => { def p1 = x$1._1 ... def pn = x$1._n body }
Expand
object name extends parents { self => body }
to:
Expand
object name extends parents { self => body }
to:
val p1, ..., pN: T = E ==> makePatDef[[val p1: T1 = E]]; ...; makePatDef[[val pN: TN = E]]
val p1, ..., pN: T = E ==> makePatDef[[val p1: T1 = E]]; ...; makePatDef[[val pN: TN = E]]
Expand variable identifier x to x @ _
Expand variable identifier x to x @ _
Create a class definition with the same info as the refined type given by parent
and refinements
.
parent { refinements }
==>
trait
He...
class C
type T1 = C { type T <: A }
T1 { type T <: B }
trait <refinement> extends C { this: T1 => type T <: A }
Create a class definition with the same info as the refined type given by parent
and refinements
.
parent { refinements }
==>
trait
Here, core
is the (possibly parameterized) class part of parent
.
If parent
is the same as core
, self is empty. Otherwise self
is parent
.
Example: Given
class C
type T1 = C { type T <: A }
the refined type
T1 { type T <: B }
is expanded to
trait <refinement> extends C { this: T1 => type T <: A }
The result of this method is used for validity checking, is thrown away afterwards.
EmptyTree in lower bound ==> Nothing EmptyTree in upper bounds ==> Any
EmptyTree in lower bound ==> Nothing EmptyTree in upper bounds ==> Any
Fill in empty type bounds with Nothing/Any. Expand private local type parameters as follows:
class C[v T] ==> class C { type v C$T; type v T = C$T }
Fill in empty type bounds with Nothing/Any. Expand private local type parameters as follows:
class C[v T] ==> class C { type v C$T; type v T = C$T }
var x: Int = expr ==> def x: Int = expr def x_=($1: <TypeTree()>): Unit = ()
var x: Int = expr ==> def x: Int = expr def x_=($1: <TypeTree()>): Unit = ()