Skip to content

Commit c6c0f71

Browse files
oderskymilessabin
authored andcommitted
Rename SyntheticMethods -> SyntheticMembers
1 parent 5829928 commit c6c0f71

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object PostTyper {
2626
* field (corresponding = super class field is initialized with subclass field)
2727
* (@see ForwardParamAccessors)
2828
*
29-
* (3) Add synthetic methods (@see SyntheticMethods)
29+
* (3) Add synthetic members (@see SyntheticMembers)
3030
*
3131
* (4) Check that `New` nodes can be instantiated, and that annotations are valid
3232
*
@@ -64,7 +64,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
6464
case _ =>
6565
}
6666

67-
override def changesMembers: Boolean = true // the phase adds super accessors and synthetic methods
67+
override def changesMembers: Boolean = true // the phase adds super accessors and synthetic members
6868

6969
override def transformPhase(implicit ctx: Context): Phase = thisPhase.next
7070

@@ -73,7 +73,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
7373

7474
val superAcc: SuperAccessors = new SuperAccessors(thisPhase)
7575
val paramFwd: ParamForwarding = new ParamForwarding(thisPhase)
76-
val synthMth: SyntheticMethods = new SyntheticMethods(thisPhase)
76+
val synthMbr: SyntheticMembers = new SyntheticMembers(thisPhase)
7777

7878
private def newPart(tree: Tree): Option[New] = methPart(tree) match {
7979
case Select(nu: New, _) => Some(nu)
@@ -230,7 +230,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
230230
case tree: Template =>
231231
withNoCheckNews(tree.parents.flatMap(newPart)) {
232232
val templ1 = paramFwd.forwardParamAccessors(tree)
233-
synthMth.addSyntheticMethods(
233+
synthMbr.addSyntheticMembers(
234234
superAcc.wrapTemplate(templ1)(
235235
super.transform(_).asInstanceOf[Template]))
236236
}

compiler/src/dotty/tools/dotc/transform/SyntheticMethods.scala renamed to compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import SymUtils._
3535
* def equals(other: Any): Boolean
3636
* def hashCode(): Int
3737
*/
38-
class SyntheticMethods(thisPhase: DenotTransformer) {
38+
class SyntheticMembers(thisPhase: DenotTransformer) {
3939
import ast.tpd._
4040

4141
private[this] var myValueSymbols: List[Symbol] = Nil
@@ -386,7 +386,7 @@ class SyntheticMethods(thisPhase: DenotTransformer) {
386386
cpy.Template(impl)(parents = newParents, body = newBody)
387387
}
388388

389-
def addSyntheticMethods(impl: Template)(implicit ctx: Context): Template = {
389+
def addSyntheticMembers(impl: Template)(implicit ctx: Context): Template = {
390390
val clazz = ctx.owner.asClass
391391
addMirrorSupport(
392392
cpy.Template(impl)(body = serializableObjectMethod(clazz) ::: caseAndValueMethods(clazz) ::: impl.body))

0 commit comments

Comments
 (0)