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 {
2828 def apply ()(using Context ): Quotes =
2929 new QuotesImpl
3030
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 }
3233 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)
3836
3937 // TODO Explore more fine grained scope ids.
4038 // 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 =>
204204
205205 /** Extension methods of `Tree` */
206206 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
210207
211208 extension (self : Tree ):
212209 /** Position in the source code */
You can’t perform that action at this time.
0 commit comments