File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,6 @@ object Formatting {
7777 class SyntaxFormatter (sc : StringContext ) extends StringFormatter (sc) {
7878 override protected def showArg (arg : Any )(implicit ctx : Context ): String =
7979 arg match {
80- case arg : Showable if ctx.settings.color.value != " never" =>
81- val highlighted =
82- SyntaxHighlighting (wrapNonSensical(arg, super .showArg(arg)))
83- new String (highlighted.toArray)
8480 case hl : Highlight =>
8581 hl.show
8682 case hb : HighlightBuffer =>
Original file line number Diff line number Diff line change @@ -729,7 +729,7 @@ object messages {
729729 val msg =
730730 hl """ | ${NoColor (msgPrefix)} type arguments for $prettyName$expectedArgString
731731 |expected: $expectedArgString
732- |actual: $actualArgString""" .stripMargin
732+ |actual: ${ NoColor ( actualArgString)} """ .stripMargin
733733
734734 val explanation = {
735735 val tooManyTypeParams =
@@ -1418,11 +1418,11 @@ object messages {
14181418 val msg = hl " $tpe does not take type parameters "
14191419
14201420 private val ps =
1421- if (params.size == 1 ) hl " a type parameter ${params.head}"
1422- else hl " type parameters ${params.map(_.show).mkString(" , " )}"
1421+ if (params.size == 1 ) s " a type parameter ${params.head}"
1422+ else s " type parameters ${params.map(_.show).mkString(" , " )}"
14231423
14241424 val explanation =
1425- i """ You specified $ps for ${hl " $tpe" }, which is not
1425+ i """ You specified ${ NoColor (ps)} for ${hl " $tpe" }, which is not
14261426 |declared to take any.
14271427 | """
14281428 }
You can’t perform that action at this time.
0 commit comments