We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14100f7 commit bcf39c4Copy full SHA for bcf39c4
compiler/src/dotty/tools/dotc/transform/init/Checker.scala
@@ -30,9 +30,11 @@ class Checker extends Phase {
30
super.isEnabled && ctx.settings.YcheckInit.value
31
32
override def runOn(units: List[CompilationUnit])(using Context): List[CompilationUnit] =
33
+ val checkCtx = ctx.fresh.setPhase(this.start)
34
Semantic.withInitialState {
35
val traverser = new InitTreeTraverser()
36
units.foreach { unit => traverser.traverse(unit.tpdTree) }
37
+ given Context = checkCtx
38
Semantic.check()
39
super.runOn(units)
40
}
0 commit comments