File tree 2 files changed +6
-6
lines changed
compiler/src/dotty/tools/dotc/tastyreflect
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ object ReflectionImpl {
10
10
apply(rootContext, SourcePosition (rootContext.source, Spans .NoSpan ))
11
11
12
12
def apply (rootContext : Contexts .Context , rootPosition : SourcePosition ): scala.tasty.Reflection =
13
- new ReflectionImpl (new KernelImpl (rootContext, rootPosition))
13
+ new scala.tasty. Reflection (new KernelImpl (rootContext, rootPosition))
14
14
15
15
def showTree (tree : tpd.Tree )(implicit ctx : Contexts .Context ): String = {
16
- val refl = new ReflectionImpl (new KernelImpl (ctx, tree.sourcePos))
17
- new refl.SourceCodePrinter ().showTree(tree)
16
+ val refl = new scala.tasty.Reflection (new KernelImpl (ctx, tree.sourcePos))
17
+ val reflCtx = ctx.asInstanceOf [refl.Context ]
18
+ val reflTree = tree.asInstanceOf [refl.Tree ]
19
+ new refl.SourceCodePrinter ().showTree(reflTree)(reflCtx)
18
20
}
19
21
20
- private class ReflectionImpl (val kernel : KernelImpl ) extends scala.tasty.Reflection
21
-
22
22
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package scala.tasty
2
2
3
3
import scala .tasty .reflect ._
4
4
5
- abstract class Reflection
5
+ class Reflection ( val kernel : Kernel )
6
6
extends Core
7
7
with ConstantOps
8
8
with ContextOps
You can’t perform that action at this time.
0 commit comments