diff --git a/compiler/src/dotty/tools/dotc/core/Phases.scala b/compiler/src/dotty/tools/dotc/core/Phases.scala index 262c15ac7ec3..4fc5856b62a3 100644 --- a/compiler/src/dotty/tools/dotc/core/Phases.scala +++ b/compiler/src/dotty/tools/dotc/core/Phases.scala @@ -360,7 +360,7 @@ object Phases { myRefChecked = prev.getClass == classOf[RefChecks] || prev.refChecked myLabelsReordered = prev.getClass == classOf[LabelDefs] || prev.labelsReordered mySameMembersStartId = if (changesMembers) id else prev.sameMembersStartId - mySameParentsStartId = if (changesParents) id else prev.sameMembersStartId + mySameParentsStartId = if (changesParents) id else prev.sameParentsStartId } protected[Phases] def init(base: ContextBase, id: Int): Unit = init(base, id, id) diff --git a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala index 20b19e92ab2e..f0c22425e0e7 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala @@ -45,6 +45,8 @@ class ElimByName extends TransformByNameApply with InfoTransformer { override def runsAfterGroupsOf = Set(Splitter.name) // I got errors running this phase in an earlier group, but I did not track them down. + override def changesParents: Boolean = true // Only true for by-names + /** Map `tree` to `tree.apply()` is `ftree` was of ExprType and becomes now a function */ private def applyIfFunction(tree: Tree, ftree: Tree)(implicit ctx: Context) = if (isByNameRef(ftree)) @@ -82,4 +84,4 @@ class ElimByName extends TransformByNameApply with InfoTransformer { object ElimByName { val name = "elimByName" -} \ No newline at end of file +}