File tree 2 files changed +2
-1
lines changed
compiler/src/dotty/tools/dotc
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class Compiler {
57
57
58
58
/** Phases dealing with the transformation from pickled trees to backend trees */
59
59
protected def transformPhases : List [List [Phase ]] =
60
+ List (new init.Checker ) :: // Check initialization of objects
60
61
List (new FirstTransform , // Some transformations to put trees into a canonical form
61
62
new CheckReentrant , // Internal use only: Check that compiled program has no data races involving global vars
62
63
new ElimPackagePrefixes , // Eliminate references to package prefixes in Select nodes
@@ -65,7 +66,6 @@ class Compiler {
65
66
new BetaReduce , // Reduce closure applications
66
67
new InlineVals , // Check right hand-sides of an `inline val`s
67
68
new ExpandSAMs ) :: // Expand single abstract method closures to anonymous classes
68
- List (new init.Checker ) :: // Check initialization of objects
69
69
List (new ElimRepeated , // Rewrite vararg parameters and arguments
70
70
new ProtectedAccessors , // Add accessors for protected members
71
71
new ExtensionMethods , // Expand methods of value classes with extension methods
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class Checker extends Phase {
29
29
private val cycleChecker = new CycleChecker (cache)
30
30
31
31
override val runsAfter = Set (Pickler .name)
32
+ val runsBefore = Set (ExpandSAMs .name)
32
33
33
34
override def isEnabled (using Context ): Boolean =
34
35
super .isEnabled && ctx.settings.YcheckInit .value
You can’t perform that action at this time.
0 commit comments