File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class ReadTasty extends Phase {
2424 withMode(Mode .ReadPositions ) {
2525 val nextUnits = collection.mutable.ListBuffer .empty[CompilationUnit ]
2626 val unitContexts = units.view.map(ctx.fresh.setCompilationUnit)
27- for given Context <- unitContexts if addTasty(nextUnits += _) do ()
27+ for unitContext <- unitContexts if addTasty(nextUnits += _)( using unitContext ) do ()
2828 nextUnits.toList
2929 }
3030
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ class Parser extends Phase {
4848
4949 val unitContexts0 =
5050 for
51- given Context <- unitContexts
52- if parse
53- yield ctx
51+ unitContext <- unitContexts
52+ if parse( using unitContext)
53+ yield unitContext
5454
5555 record(" parsedTrees" , ast.Trees .ntrees)
5656
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class Checker extends Phase:
4141 val unitContexts = units.map(unit => checkCtx.fresh.setCompilationUnit(unit))
4242
4343 val units0 =
44- for given Context <- unitContexts if traverse(traverser) yield ctx .compilationUnit
44+ for unitContext <- unitContexts if traverse(traverser)( using unitContext) yield unitContext .compilationUnit
4545
4646 cancellable {
4747 val classes = traverser.getClasses()
Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
7575 val unitContexts0 =
7676 try
7777 for
78- given Context <- unitContexts
79- if enterSyms
80- yield ctx
78+ unitContext <- unitContexts
79+ if enterSyms( using unitContext)
80+ yield unitContext
8181 finally
8282 ctx.run.advanceSubPhase() // tick from "typer (indexing)" to "typer (typechecking)"
8383
@@ -94,19 +94,19 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
9494 val unitContexts1 =
9595 try
9696 for
97- given Context <- unitContexts0
98- if typeCheck
99- yield ctx
97+ unitContext <- unitContexts0
98+ if typeCheck( using unitContext)
99+ yield unitContext
100100 finally
101101 ctx.run.advanceSubPhase() // tick from "typer (typechecking)" to "typer (java checking)"
102102
103103 record(" total trees after typer" , ast.Trees .ntrees)
104104
105105 val unitContexts2 =
106106 for
107- given Context <- unitContexts1
108- if javaCheck // after typechecking to avoid cycles
109- yield ctx
107+ unitContext <- unitContexts1
108+ if javaCheck( using unitContext) // after typechecking to avoid cycles
109+ yield unitContext
110110
111111 val newUnits = unitContexts2.map(_.compilationUnit).filterNot(discardAfterTyper)
112112 ctx.run.nn.checkSuspendedUnits(newUnits)
You can’t perform that action at this time.
0 commit comments