File tree 4 files changed +14
-14
lines changed
compiler/src/dotty/tools/dotc
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 {
24
24
withMode(Mode .ReadPositions ) {
25
25
val nextUnits = collection.mutable.ListBuffer .empty[CompilationUnit ]
26
26
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 ()
28
28
nextUnits.toList
29
29
}
30
30
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ class Parser extends Phase {
48
48
49
49
val unitContexts0 =
50
50
for
51
- given Context <- unitContexts
52
- if parse
53
- yield ctx
51
+ unitContext <- unitContexts
52
+ if parse( using unitContext)
53
+ yield unitContext
54
54
55
55
record(" parsedTrees" , ast.Trees .ntrees)
56
56
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class Checker extends Phase:
41
41
val unitContexts = units.map(unit => checkCtx.fresh.setCompilationUnit(unit))
42
42
43
43
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
45
45
46
46
cancellable {
47
47
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 {
75
75
val unitContexts0 =
76
76
try
77
77
for
78
- given Context <- unitContexts
79
- if enterSyms
80
- yield ctx
78
+ unitContext <- unitContexts
79
+ if enterSyms( using unitContext)
80
+ yield unitContext
81
81
finally
82
82
ctx.run.advanceSubPhase() // tick from "typer (indexing)" to "typer (typechecking)"
83
83
@@ -94,19 +94,19 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
94
94
val unitContexts1 =
95
95
try
96
96
for
97
- given Context <- unitContexts0
98
- if typeCheck
99
- yield ctx
97
+ unitContext <- unitContexts0
98
+ if typeCheck( using unitContext)
99
+ yield unitContext
100
100
finally
101
101
ctx.run.advanceSubPhase() // tick from "typer (typechecking)" to "typer (java checking)"
102
102
103
103
record(" total trees after typer" , ast.Trees .ntrees)
104
104
105
105
val unitContexts2 =
106
106
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
110
110
111
111
val newUnits = unitContexts2.map(_.compilationUnit).filterNot(discardAfterTyper)
112
112
ctx.run.nn.checkSuspendedUnits(newUnits)
You can’t perform that action at this time.
0 commit comments