ValDefModule
scala.quoted.Quotes.reflectModule.ValDefModule
trait ValDefModule
Methods of the module object val ValDef
Attributes
- Source
- Quotes.scala
- Graph
-
- Supertypes
- Self type
-
ValDef.type
Members list
Value members
Abstract methods
Create a value definition val x
, var x
or lazy val x
with the signature defined in the symbol.
Create a value definition val x
, var x
or lazy val x
with the signature defined in the symbol.
The rhs
should return Some
containing the implementation of the method, or None
if the method has no implementation. Any definition directly inside the implementation should have symbol
as owner.
Use Symbol.asQuotes
to create the rhs using quoted code.
See also: Tree.changeOwner
Attributes
- Source
- Quotes.scala
Attributes
- Source
- Quotes.scala
Creates a block { val
Creates a block { val
Usage:
ValDef.let(owner, "x", rhs1) { x =>
ValDef.let(x.symbol.owner, "y", rhs2) { y =>
// use `x` and `y`
}
}
Attributes
- Source
- Quotes.scala
Creates a block { val x1 =
Creates a block { val x1 =
Usage:
ValDef.let(owner, rhsList) { xs =>
...
}
Attributes
- Source
- Quotes.scala
In this article