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 @@ -204,9 +204,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
204
204
205
205
/** Extension methods of `Tree` */
206
206
trait TreeMethods {
207
- // Dodo: Drop once extension methods have stabilized
208
- def temporaryShowAnsiColored (self : Tree ): String = self.showAnsiColored
209
- def temporaryShow (self : Tree ): String = self.show
210
207
211
208
extension (self : Tree ):
212
209
/** Position in the source code */
You can’t perform that action at this time.
0 commit comments