@@ -3837,10 +3837,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38373837 * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
38383838 * direct or indirect children of the reflection context's owner.
38393839 */
3840- // TODO: add flags and privateWithin
38413840 @ experimental def newClass (owner : Symbol , name : String , parents : List [TypeRepr ], decls : Symbol => List [Symbol ], selfType : Option [TypeRepr ]): Symbol
38423841
3843- /** Generates a new class symbol for a class with a public constructor.
3842+ /** Generates a new class symbol for a class with a public single term clause constructor.
38443843 *
38453844 * @param owner The owner of the class
38463845 * @param name The name of the class
@@ -3851,7 +3850,13 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38513850 * @param conParamNames constructor parameter names.
38523851 * @param conParamTypes constructor parameter types.
38533852 *
3854- * Parameters can be obtained via classSymbol.memberField
3853+ * Parameters assigned by the constructor can be obtained via `classSymbol.memberField`.
3854+ * This symbol starts without an accompanying definition.
3855+ * It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3856+ * this symbol to the ClassDef constructor.
3857+ *
3858+ * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
3859+ * direct or indirect children of the reflection context's owner.
38553860 */
38563861 @ experimental def newClass (
38573862 owner : Symbol ,
@@ -3864,24 +3869,32 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
38643869 conParamTypes : List [TypeRepr ]
38653870 ): Symbol
38663871
3867- /**
3868- *
3869- *
3870- * @param owner The owner of the class
3871- * @param name The name of the class
3872- * @param parents Function returning the parent classes of the class. The first parent must not be a trait
3873- * Takes the constructed class symbol as an argument. Calling `cls.typeRef.asType` as part of this function will lead to cyclic reference errors.
3874- * @param decls The member declarations of the class provided the symbol of this class
3875- * @param selfType The self type of the class if it has one
3876- * @param clsFlags extra flags with which the class symbol should be constructed
3877- * @param clsPrivateWithin the symbol within which this new class symbol should be private. May be noSymbol
3878- * @param conMethodType The MethodOrPoly type representing the type of the constructor.
3879- * PolyType may only represent the first clause of the constructor.
3880- * @param conFlags extra flags with which the constructor symbol should be constructed
3881- * @param conPrivateWithin the symbol within which the constructor for this new class symbol should be private. May be noSymbol.
3882- * @param conParamFlags extra flags with which the constructor parameter symbols should be constructed. Must match the shape of `conMethodType`.
3883- *
3884- */
3872+ /** Generates a new class symbol with a constructor of the shape signified by a passed PolyOrMethod parameter.
3873+ * TODO example with PolyType
3874+ *
3875+ * @param owner The owner of the class
3876+ * @param name The name of the class
3877+ * @param parents Function returning the parent classes of the class. The first parent must not be a trait
3878+ * Takes the constructed class symbol as an argument. Calling `cls.typeRef.asType` as part of this function will lead to cyclic reference errors.
3879+ * @param decls The member declarations of the class provided the symbol of this class
3880+ * @param selfType The self type of the class if it has one
3881+ * @param clsFlags extra flags with which the class symbol should be constructed
3882+ * @param clsPrivateWithin the symbol within which this new class symbol should be private. May be noSymbol
3883+ * @param conMethodType Function returning MethodOrPoly type representing the type of the constructor.
3884+ * Takes the result type as parameter which must be returned from the innermost MethodOrPoly.
3885+ * PolyType may only represent the first clause of the constructor.
3886+ * @param conFlags extra flags with which the constructor symbol should be constructed
3887+ * @param conPrivateWithin the symbol within which the constructor for this new class symbol should be private. May be noSymbol.
3888+ * @param conParamFlags extra flags with which the constructor parameter symbols should be constructed. Must match the shape of `conMethodType`.
3889+ *
3890+ * Term and type parameters assigned by the constructor can be obtained via `classSymbol.memberField`/`classSymbol.memberType`.
3891+ * This symbol starts without an accompanying definition.
3892+ * It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing
3893+ * this symbol to the ClassDef constructor.
3894+ *
3895+ * @note As a macro can only splice code into the point at which it is expanded, all generated symbols must be
3896+ * direct or indirect children of the reflection context's owner.
3897+ */
38853898 @ experimental def newClass (
38863899 owner : Symbol ,
38873900 name : String ,
0 commit comments