diff --git a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala index 1d02f27a78c6..1b5b93825c76 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala @@ -28,13 +28,11 @@ object QuotesImpl { def apply()(using Context): Quotes = new QuotesImpl - def showDecompiledTree(tree: tpd.Tree)(using Context): String = { + def showDecompiledTree(tree: tpd.Tree)(using Context): String = + import qctx.reflect.TreeMethodsImpl.{showAnsiColored, show} val qctx: QuotesImpl = new QuotesImpl(using MacroExpansion.context(tree)) - if ctx.settings.color.value == "always" then - qctx.reflect.TreeMethodsImpl.temporaryShowAnsiColored(tree) - else - qctx.reflect.TreeMethodsImpl.temporaryShow(tree) - } + if ctx.settings.color.value == "always" then showAnsiColored(tree) + else show(tree) // TODO Explore more fine grained scope ids. // This id can only differentiate scope extrusion from one compiler instance to another. diff --git a/library/src/scala/quoted/Quotes.scala b/library/src/scala/quoted/Quotes.scala index ec9b1890dc1b..fe406fd69cc3 100644 --- a/library/src/scala/quoted/Quotes.scala +++ b/library/src/scala/quoted/Quotes.scala @@ -193,9 +193,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => protected val TreeMethodsImpl: TreeMethods trait TreeMethods { - // Dodo: Drop once extension methods have stabilized - def temporaryShowAnsiColored(self: Tree): String = self.showAnsiColored - def temporaryShow(self: Tree): String = self.show extension (self: Tree): /** Position in the source code */