@@ -3852,10 +3852,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38523852 * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
38533853 * direct or indirect children of the reflection context's owner.
38543854 */
3855- // TODO: add flags and privateWithin
38563855 @ experimental def newClass (owner : Symbol , name : String , parents : List [TypeRepr ], decls : Symbol => List [Symbol ], selfType : Option [TypeRepr ]): Symbol
38573856
3858- /** Generates a new class symbol for a class with a public constructor.
3857+ /** Generates a new class symbol for a class with a public single term clause constructor.
38593858 *
38603859 * @param owner The owner of the class
38613860 * @param name The name of the class
@@ -3866,7 +3865,13 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38663865 * @param conParamNames constructor parameter names.
38673866 * @param conParamTypes constructor parameter types.
38683867 *
3869- * Parameters can be obtained via classSymbol.memberField
3868+ * Parameters assigned by the constructor can be obtained via `classSymbol.memberField`.
3869+ * This symbol starts without an accompanying definition.
3870+ * It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3871+ * this symbol to the ClassDef constructor.
3872+ *
3873+ * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
3874+ * direct or indirect children of the reflection context's owner.
38703875 */
38713876 @ experimental def newClass (
38723877 owner : Symbol ,
@@ -3879,24 +3884,32 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38793884 conParamTypes : List [TypeRepr ]
38803885 ): Symbol
38813886
3882- /**
3883- *
3884- *
3885- * @param owner The owner of the class
3886- * @param name The name of the class
3887- * @param parents Function returning the parent classes of the class. The first parent must not be a trait
3888- * Takes the constructed class symbol as an argument. Calling `cls.typeRef.asType` as part of this function will lead to cyclic reference errors.
3889- * @param decls The member declarations of the class provided the symbol of this class
3890- * @param selfType The self type of the class if it has one
3891- * @param clsFlags extra flags with which the class symbol should be constructed
3892- * @param clsPrivateWithin the symbol within which this new class symbol should be private. May be noSymbol
3893- * @param conMethodType The MethodOrPoly type representing the type of the constructor.
3894- * PolyType may only represent the first clause of the constructor.
3895- * @param conFlags extra flags with which the constructor symbol should be constructed
3896- * @param conPrivateWithin the symbol within which the constructor for this new class symbol should be private. May be noSymbol.
3897- * @param conParamFlags extra flags with which the constructor parameter symbols should be constructed. Must match the shape of `conMethodType`.
3898- *
3899- */
3887+ /** Generates a new class symbol with a constructor of the shape signified by a passed PolyOrMethod parameter.
3888+ * TODO example with PolyType
3889+ *
3890+ * @param owner The owner of the class
3891+ * @param name The name of the class
3892+ * @param parents Function returning the parent classes of the class. The first parent must not be a trait
3893+ * Takes the constructed class symbol as an argument. Calling `cls.typeRef.asType` as part of this function will lead to cyclic reference errors.
3894+ * @param decls The member declarations of the class provided the symbol of this class
3895+ * @param selfType The self type of the class if it has one
3896+ * @param clsFlags extra flags with which the class symbol should be constructed
3897+ * @param clsPrivateWithin the symbol within which this new class symbol should be private. May be noSymbol
3898+ * @param conMethodType Function returning MethodOrPoly type representing the type of the constructor.
3899+ * Takes the result type as parameter which must be returned from the innermost MethodOrPoly.
3900+ * PolyType may only represent the first clause of the constructor.
3901+ * @param conFlags extra flags with which the constructor symbol should be constructed
3902+ * @param conPrivateWithin the symbol within which the constructor for this new class symbol should be private. May be noSymbol.
3903+ * @param conParamFlags extra flags with which the constructor parameter symbols should be constructed. Must match the shape of `conMethodType`.
3904+ *
3905+ * Term and type parameters assigned by the constructor can be obtained via `classSymbol.memberField`/`classSymbol.memberType`.
3906+ * This symbol starts without an accompanying definition.
3907+ * It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3908+ * this symbol to the ClassDef constructor.
3909+ *
3910+ * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
3911+ * direct or indirect children of the reflection context's owner.
3912+ */
39003913 @ experimental def newClass (
39013914 owner : Symbol ,
39023915 name : String ,
0 commit comments