File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
compiler/src/scala/quoted/runtime/impl Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,11 @@ object QuotesImpl {
28
28
def apply ()(using Context ): Quotes =
29
29
new QuotesImpl
30
30
31
- def showDecompiledTree (tree : tpd.Tree )(using Context ): String = {
31
+ def showDecompiledTree (tree : tpd.Tree )(using Context ): String =
32
+ import qctx .reflect .TreeMethodsImpl .{showAnsiColored , show }
32
33
val qctx : QuotesImpl = new QuotesImpl (using MacroExpansion .context(tree))
33
- if ctx.settings.color.value == " always" then
34
- qctx.reflect.TreeMethodsImpl .temporaryShowAnsiColored(tree)
35
- else
36
- qctx.reflect.TreeMethodsImpl .temporaryShow(tree)
37
- }
34
+ if ctx.settings.color.value == " always" then showAnsiColored(tree)
35
+ else show(tree)
38
36
39
37
// TODO Explore more fine grained scope ids.
40
38
// This id can only differentiate scope extrusion from one compiler instance to another.
Original file line number Diff line number Diff line change @@ -193,9 +193,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
193
193
protected val TreeMethodsImpl : TreeMethods
194
194
195
195
trait TreeMethods {
196
- // Dodo: Drop once extension methods have stabilized
197
- def temporaryShowAnsiColored (self : Tree ): String = self.showAnsiColored
198
- def temporaryShow (self : Tree ): String = self.show
199
196
200
197
extension (self : Tree ):
201
198
/** Position in the source code */
You can’t perform that action at this time.
0 commit comments