Skip to content

Commit 1f3c305

Browse files
committed
Add documentation
1 parent 86e0e32 commit 1f3c305

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package dotty.tools.dotc.transform
22

3-
import dotty.tools.dotc.{CompilationUnit, FromTasty}
3+
import dotty.tools.dotc.CompilationUnit
44
import dotty.tools.dotc.ast.Trees._
55
import dotty.tools.dotc.ast.tpd
66
import dotty.tools.dotc.core.Contexts._
@@ -20,6 +20,7 @@ class LinkAll extends MiniPhaseTransform {
2020

2121
override def phaseName = "linkAll"
2222

23+
/** Do not transform the any tree, runOn will traverse the trees and reload compilation units if needed */
2324
override def prepareForUnit(tree: tpd.Tree)(implicit ctx: Context): TreeTransform = NoTransform
2425

2526
override def runOn(units: List[CompilationUnit])(implicit ctx: Context): List[CompilationUnit] = {
@@ -31,7 +32,6 @@ class LinkAll extends MiniPhaseTransform {
3132
val classesToLoad = unprocessed.foldLeft(Set.empty[ClassDenotation])((acc, unit) => accum.apply(acc, unit.tpdTree)) -- loadedClasses
3233
val loadedUnits = classesToLoad.flatMap(cls => loadCompilationUnit(cls))
3334
allUnits(processed ++ unprocessed, loadedUnits, loadedClasses ++ classesToLoad)
34-
3535
}
3636
}
3737

0 commit comments

Comments
 (0)