Skip to content

Commit 8386b64

Browse files
ghostbuster91ckipp01
authored andcommitted
Simplify const rendering
1 parent 363a1e2 commit 8386b64

File tree

1 file changed

+1
-2
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+1
-2
lines changed

Diff for: compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

+1-2
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,7 @@ object SpaceEngine {
790790

791791
def doShow(s: Space, flattenList: Boolean = false): String = s match {
792792
case Empty => "empty"
793-
case Typ(ConstantType(const : Constant), _) if const.tag == StringTag => "\"" + const.value + "\""
794-
case Typ(ConstantType(const : Constant), _) => "" + const.value
793+
case Typ(c: ConstantType, _) => c.value.show
795794
case Typ(tp: TermRef, _) =>
796795
if (flattenList && tp <:< defn.NilType) ""
797796
else tp.symbol.showName

0 commit comments

Comments
 (0)