Skip to content

Commit 4ded045

Browse files
authored
Merge pull request #4259 from dotty-staging/fix/sameParents
Fix a typo that caused unnecessary cache invalidation
2 parents 8f080a5 + cdbb95d commit 4ded045

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/core/Phases.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ object Phases {
363363
myRefChecked = prev.getClass == classOf[RefChecks] || prev.refChecked
364364
myLabelsReordered = prev.getClass == classOf[LabelDefs] || prev.labelsReordered
365365
mySameMembersStartId = if (changesMembers) id else prev.sameMembersStartId
366-
mySameParentsStartId = if (changesParents) id else prev.sameMembersStartId
366+
mySameParentsStartId = if (changesParents) id else prev.sameParentsStartId
367367
}
368368

369369
protected[Phases] def init(base: ContextBase, id: Int): Unit = init(base, id, id)

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class ElimByName extends TransformByNameApply with InfoTransformer {
4545
override def runsAfterGroupsOf = Set(Splitter.name)
4646
// I got errors running this phase in an earlier group, but I did not track them down.
4747

48+
override def changesParents: Boolean = true // Only true for by-names
49+
4850
/** Map `tree` to `tree.apply()` is `ftree` was of ExprType and becomes now a function */
4951
private def applyIfFunction(tree: Tree, ftree: Tree)(implicit ctx: Context) =
5052
if (isByNameRef(ftree))
@@ -82,4 +84,4 @@ class ElimByName extends TransformByNameApply with InfoTransformer {
8284

8385
object ElimByName {
8486
val name = "elimByName"
85-
}
87+
}

0 commit comments

Comments
 (0)