@@ -3669,13 +3669,32 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3669
3669
*/
3670
3670
def newMethod (parent : Symbol , name : String , tpe : TypeRepr , flags : Flags , privateWithin : Symbol ): Symbol
3671
3671
3672
+ /** Generates a new method symbol with the given parent, name and type.
3673
+ *
3674
+ * To define a member method of a class, use the `newMethod` within the `decls` function of `newClass`.
3675
+ *
3676
+ * @param parent The owner of the method
3677
+ * @param name The name of the method
3678
+ * @param tpe The type of the method (MethodType, PolyType, ByNameType)
3679
+ * @param flags extra flags to with which the symbol should be constructed
3680
+ * @param privateWithin the symbol within which this new method symbol should be private. May be noSymbol.
3681
+ *
3682
+ * This symbol starts without an accompanying definition.
3683
+ * It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3684
+ * this symbol to the DefDef constructor.
3685
+ *
3686
+ * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
3687
+ * direct or indirect children of the reflection context's owner.
3688
+ */
3689
+ @ experimental def newUniqueMethod (parent : Symbol , namePrefix : String , tpe : TypeRepr , flags : Flags , privateWithin : Symbol ): Symbol
3690
+
3672
3691
/** Generates a new val/var/lazy val symbol with the given parent, name and type.
3673
3692
*
3674
3693
* This symbol starts without an accompanying definition.
3675
3694
* It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3676
3695
* this symbol to the ValDef constructor.
3677
3696
*
3678
- * Note: Also see reflect .let
3697
+ * Note: Also see ValDef .let
3679
3698
*
3680
3699
* @param parent The owner of the val/var/lazy val
3681
3700
* @param name The name of the val/var/lazy val
@@ -3687,6 +3706,25 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3687
3706
*/
3688
3707
def newVal (parent : Symbol , name : String , tpe : TypeRepr , flags : Flags , privateWithin : Symbol ): Symbol
3689
3708
3709
+ /** Generates a new val/var/lazy val symbol with the given parent, name prefix and type.
3710
+ *
3711
+ * This symbol starts without an accompanying definition.
3712
+ * It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3713
+ * this symbol to the ValDef constructor.
3714
+ *
3715
+ * Note: Also see newVal
3716
+ * Note: Also see ValDef.let
3717
+ *
3718
+ * @param parent The owner of the val/var/lazy val
3719
+ * @param name The name of the val/var/lazy val
3720
+ * @param tpe The type of the val/var/lazy val
3721
+ * @param flags extra flags to with which the symbol should be constructed
3722
+ * @param privateWithin the symbol within which this new method symbol should be private. May be noSymbol.
3723
+ * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
3724
+ * direct or indirect children of the reflection context's owner.
3725
+ */
3726
+ @ experimental def newUniqueVal (parent : Symbol , namePrefix : String , tpe : TypeRepr , flags : Flags , privateWithin : Symbol ): Symbol
3727
+
3690
3728
/** Generates a pattern bind symbol with the given parent, name and type.
3691
3729
*
3692
3730
* This symbol starts without an accompanying definition.
0 commit comments