File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import util._
15
15
import Decorators ._
16
16
import dotty .tools .dotc .transform .Pickler
17
17
import pickling .DottyUnpickler
18
+ import ast .tpd ._
18
19
19
20
/** Compiler for TASTY files.
20
21
* Usage:
@@ -57,6 +58,10 @@ object FromTasty extends Driver {
57
58
override def toString = s " class file $className"
58
59
}
59
60
61
+ object force extends TreeTraverser {
62
+ def traverse (tree : Tree )(implicit ctx : Context ): Unit = traverseChildren(tree)
63
+ }
64
+
60
65
class ReadTastyTreesFromClasses extends FrontEnd {
61
66
override def runOn (units : List [CompilationUnit ])(implicit ctx : Context ): List [CompilationUnit ] =
62
67
units.map(readTASTY)
@@ -80,6 +85,7 @@ object FromTasty extends Driver {
80
85
val (List (unpickled), source) = unpickler.body(readPositions = true )
81
86
val unit1 = new CompilationUnit (source)
82
87
unit1.tpdTree = unpickled
88
+ force.traverse(unit1.tpdTree)
83
89
unit1
84
90
case _ =>
85
91
cannotUnpickle(s " its class file ${info.classfile} does not have a TASTY attribute " )
You can’t perform that action at this time.
0 commit comments