@@ -2656,21 +2656,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
2656
2656
conParamNames : List [String ],
2657
2657
conParamTypes : List [TypeRepr ],
2658
2658
): Symbol =
2659
- checkValidFlags(clsFlags, Flags .validClassFlags)
2660
- assert(conParamNames.length == conParamTypes.length, " paramNames and paramTypes must have the same length" )
2661
- assert(! clsPrivateWithin.exists || clsPrivateWithin.isType, " clsPrivateWithin must be a type symbol or `Symbol.noSymbol`" )
2662
- val cls = dotc.core.Symbols .newNormalizedClassSymbolUsingClassSymbolinParents(
2659
+ assert(conParamNames.length == conParamTypes.length, " Lengths of conParamNames and conParamTypes must be equal" )
2660
+ newClass(
2663
2661
owner,
2664
- name.toTypeName,
2665
- clsFlags,
2662
+ name,
2666
2663
parents,
2667
- selfType.getOrElse(Types .NoType ),
2668
- clsPrivateWithin)
2669
- cls.enter(dotc.core.Symbols .newConstructor(cls, dotc.core.Flags .Synthetic , conParamNames.map(_.toTermName), conParamTypes))
2670
- for (name, tpe) <- conParamNames.zip(conParamTypes) do
2671
- cls.enter(dotc.core.Symbols .newSymbol(cls, name.toTermName, Flags .ParamAccessor , tpe, Symbol .noSymbol))
2672
- for sym <- decls(cls) do cls.enter(sym)
2673
- cls
2664
+ decls,
2665
+ selfType,
2666
+ clsFlags,
2667
+ clsPrivateWithin,
2668
+ conMethodType = res => MethodType (conParamNames)(_ => conParamTypes, _ => res),
2669
+ conFlags = Flags .EmptyFlags ,
2670
+ conPrivateWithin = Symbol .noSymbol,
2671
+ conParamFlags = List (for i <- conParamNames yield Flags .EmptyFlags )
2672
+ )
2674
2673
2675
2674
def newClass (
2676
2675
owner : Symbol ,
0 commit comments