@@ -1595,6 +1595,21 @@ class Reflection(private[scala] val internal: CompilerInterface) { self =>
15951595 /** Returns the type (Type) of T */
15961596 def typeOf [T ](given qtype : scala.quoted.Type [T ]): Type = qtype.unseal.tpe
15971597
1598+ /** Members of `TypeOrBounds` */
1599+ extension TypeOrBoundsOps on (tpe : TypeOrBounds ) {
1600+ /** Shows the tree as extractors */
1601+ def showExtractors (given ctx : Context ): String =
1602+ new ExtractorsPrinter [self.type ](self).showTypeOrBounds(tpe)
1603+
1604+ /** Shows the tree as fully typed source code */
1605+ def show (given ctx : Context ): String =
1606+ tpe.showWith(SyntaxHighlight .plain)
1607+
1608+ /** Shows the tree as fully typed source code */
1609+ def showWith (syntaxHighlight : SyntaxHighlight )(given ctx : Context ): String =
1610+ new SourceCodePrinter [self.type ](self)(syntaxHighlight).showTypeOrBounds(tpe)
1611+ }
1612+
15981613 // ----- Types ----------------------------------------------------
15991614
16001615 extension TypeOps on (self : Type ) {
@@ -2669,21 +2684,6 @@ class Reflection(private[scala] val internal: CompilerInterface) { self =>
26692684 // PRINTERS //
26702685 // ////////////
26712686
2672- /** Adds `show` as an extension method of a `TypeOrBounds` */
2673- extension TypeOrBoundsShowDeco on (tpe : TypeOrBounds ) {
2674- /** Shows the tree as extractors */
2675- def showExtractors (given ctx : Context ): String =
2676- new ExtractorsPrinter [self.type ](self).showTypeOrBounds(tpe)
2677-
2678- /** Shows the tree as fully typed source code */
2679- def show (given ctx : Context ): String =
2680- tpe.showWith(SyntaxHighlight .plain)
2681-
2682- /** Shows the tree as fully typed source code */
2683- def showWith (syntaxHighlight : SyntaxHighlight )(given ctx : Context ): String =
2684- new SourceCodePrinter [self.type ](self)(syntaxHighlight).showTypeOrBounds(tpe)
2685- }
2686-
26872687 /** Adds `show` as an extension method of a `Symbol` */
26882688 extension SymbolShowDeco on (symbol : Symbol ) {
26892689 /** Shows the tree as extractors */
0 commit comments