File tree 3 files changed +9
-2
lines changed
src/dotty/tools/dotc/printing
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -536,9 +536,9 @@ class PlainPrinter(_ctx: Context) extends Printer {
536
536
protected def literalText (text : Text ): Text = coloredText(text, SyntaxHighlighting .LiteralColor )
537
537
protected def stringText (text : Text ): Text = coloredText(text, SyntaxHighlighting .StringColor )
538
538
539
- private def coloredStr (text : String , color : String ): String =
539
+ protected def coloredStr (text : String , color : String ): String =
540
540
if (ctx.useColors) color + text + SyntaxHighlighting .NoColor else text
541
- private def coloredText (text : Text , color : String ): Text =
541
+ protected def coloredText (text : Text , color : String ): Text =
542
542
if (ctx.useColors) color ~ text ~ SyntaxHighlighting .NoColor else text
543
543
}
544
544
Original file line number Diff line number Diff line change @@ -37,4 +37,9 @@ class ReplPrinter(_ctx: Context) extends DecompilerPrinter(_ctx) {
37
37
else " :" ~~ toText(sym.info)
38
38
}
39
39
}
40
+
41
+ // We don't want the colors coming from RefinedPrinter as the REPL uses its
42
+ // own syntax coloring mechanism.
43
+ override def coloredStr (text : String , color : String ): String = text
44
+ override def coloredText (text : Text , color : String ): Text = text
40
45
}
Original file line number Diff line number Diff line change
1
+ scala> def fun[T](x: T): implicit List[T] => Int = ???
2
+ def fun[T](x: T): implicit List[T] => Int
You can’t perform that action at this time.
0 commit comments