@@ -80,8 +80,8 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
80
80
else NoSymbol
81
81
}
82
82
83
- private def synthesizeDef (sym : TermSymbol , rhsFn : List [List [Tree ]] => Context => Tree )(using Context ): Tree =
84
- DefDef (sym, rhsFn(_)(ctx.withOwner(sym))).withSpan(ctx.owner.span.focus)
83
+ private def synthesizeDef (sym : TermSymbol , rhsFn : List [List [Tree ]] => Context ? => Tree )(using Context ): Tree =
84
+ DefDef (sym, rhsFn(_)(using ctx.withOwner(sym))).withSpan(ctx.owner.span.focus)
85
85
86
86
/** If this is a case or value class, return the appropriate additional methods,
87
87
* otherwise return nothing.
@@ -131,7 +131,7 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
131
131
case nme.ordinal => Select (This (clazz), nme.ordinalDollar)
132
132
}
133
133
report.log(s " adding $synthetic to $clazz at ${currentPhase}" )
134
- synthesizeDef(synthetic, treess => ctx => syntheticRHS(treess)( using ctx) )
134
+ synthesizeDef(synthetic, syntheticRHS)
135
135
}
136
136
137
137
/** The class
@@ -476,12 +476,12 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
476
476
classParents = oldClassInfo.classParents :+ parent)
477
477
clazz.copySymDenotation(info = newClassInfo).installAfter(thisPhase)
478
478
}
479
- def addMethod (name : TermName , info : Type , cls : Symbol , body : (Symbol , Tree , Context ) => Tree ): Unit = {
479
+ def addMethod (name : TermName , info : Type , cls : Symbol , body : (Symbol , Tree ) => Context ? => Tree ): Unit = {
480
480
val meth = newSymbol(clazz, name, Synthetic | Method , info, coord = clazz.coord)
481
481
if (! existingDef(meth, clazz).exists) {
482
482
meth.entered
483
483
newBody = newBody :+
484
- synthesizeDef(meth, vrefss => ctx => body(cls, vrefss.head.head, ctx ))
484
+ synthesizeDef(meth, vrefss => body(cls, vrefss.head.head))
485
485
}
486
486
}
487
487
val linked = clazz.linkedClass
@@ -500,12 +500,12 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
500
500
def makeProductMirror (cls : Symbol ) = {
501
501
addParent(defn.Mirror_ProductClass .typeRef)
502
502
addMethod(nme.fromProduct, MethodType (defn.ProductClass .typeRef :: Nil , monoType.typeRef), cls,
503
- fromProductBody(_, _)( using _) .ensureConforms(monoType.typeRef)) // t4758.scala or i3381.scala are examples where a cast is needed
503
+ fromProductBody(_, _).ensureConforms(monoType.typeRef)) // t4758.scala or i3381.scala are examples where a cast is needed
504
504
}
505
505
def makeSumMirror (cls : Symbol ) = {
506
506
addParent(defn.Mirror_SumClass .typeRef)
507
507
addMethod(nme.ordinal, MethodType (monoType.typeRef :: Nil , defn.IntType ), cls,
508
- ordinalBody(_, _)( using _) )
508
+ ordinalBody(_, _))
509
509
}
510
510
511
511
if (clazz.is(Module )) {
0 commit comments