Skip to content

Commit f51e1fc

Browse files
committed
Add color to show
1 parent 9fb21c3 commit f51e1fc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ object Semantic:
5252
*
5353
*/
5454
sealed abstract class Value:
55-
def show: String = this match
55+
def show(using Context): String = this match
56+
case ThisRef(klass) =>
57+
"ThisRef[" + klass.show + "]"
5658
case Warm(klass, outer, ctor, args) =>
57-
"Warm[" + klass + "] { outer = " + outer.show + ", args = " + args.map(_.show).mkString("(", ", ", ")") + " }"
59+
"Warm[" + klass.show + "] { outer = " + outer.show + ", args = " + args.map(_.show).mkString("(", ", ", ")") + " }"
5860
case Fun(expr, thisV, klass) =>
59-
"Fun { this = " + thisV.show + ", owner = " + klass + " }"
61+
"Fun { this = " + thisV.show + ", owner = " + klass.show + " }"
6062
case RefSet(values) =>
6163
values.map(_.show).mkString("Set { ", ", ", " }")
6264
case _ =>

0 commit comments

Comments
 (0)