Skip to content

Commit fd97aee

Browse files
authored
Merge pull request scala#14464 from Xavientois/fix-megaPhase-init-order
2 parents bbe74ce + f17e4d5 commit fd97aee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,6 @@ class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase {
455455

456456
// Initialization code
457457

458-
for ((phase, idx) <- miniPhases.zipWithIndex) {
459-
phase.superPhase = this
460-
phase.idxInGroup = idx
461-
}
462-
463458
/** Class#getDeclaredMethods is slow, so we cache its output */
464459
private val clsMethodsCache = new java.util.IdentityHashMap[Class[?], Array[java.lang.reflect.Method]]
465460

@@ -564,6 +559,11 @@ class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase {
564559
private val nxOtherPrepPhase = init("prepareForOther")
565560
private val nxOtherTransPhase = init("transformOther")
566561

562+
for ((phase, idx) <- miniPhases.zipWithIndex) {
563+
phase.superPhase = this
564+
phase.idxInGroup = idx
565+
}
566+
567567
// Boilerplate snippets
568568

569569
def prepIdent(tree: Ident, start: Int)(using Context): Context = {

0 commit comments

Comments
 (0)