@@ -497,6 +497,14 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
497
497
498
498
/** Methods of the module object `val DefDef` */
499
499
trait DefDefModule { this : DefDef .type =>
500
+ /** Create a method definition `def f[..](...)` with the signature defined in the symbol.
501
+ *
502
+ * The `rhsFn` is a function that receives references to its parameters and should return
503
+ * `Some` containing the implementation of the method. Returns `None` the method has no implementation.
504
+ * Any definition directly inside the implementation should have `symbol` as owner.
505
+ *
506
+ * See also: `Tree.changeOwner`
507
+ */
500
508
def apply (symbol : Symbol , rhsFn : List [List [Tree ]] => Option [Term ]): DefDef
501
509
def copy (original : Tree )(name : String , paramss : List [ParamClause ], tpt : TypeTree , rhs : Option [Term ]): DefDef
502
510
def unapply (ddef : DefDef ): (String , List [ParamClause ], TypeTree , Option [Term ])
@@ -558,6 +566,14 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
558
566
559
567
/** Methods of the module object `val ValDef` */
560
568
trait ValDefModule { this : ValDef .type =>
569
+ /** Create a value definition `val x`, `var x` or `lazy val x` with the signature defined in the symbol.
570
+ *
571
+ * The `rhs` should return be `Some` containing the implementation of the method.
572
+ * Returns `None` the method has no implementation.
573
+ * Any definition directly inside the implementation should have `symbol` as owner.
574
+ *
575
+ * See also: `Tree.changeOwner`
576
+ */
561
577
def apply (symbol : Symbol , rhs : Option [Term ]): ValDef
562
578
def copy (original : Tree )(name : String , tpt : TypeTree , rhs : Option [Term ]): ValDef
563
579
def unapply (vdef : ValDef ): (String , TypeTree , Option [Term ])
0 commit comments