Skip to content

Commit 0374995

Browse files
ghostbuster91Kordyjan
authored andcommitted
Simplify const rendering
[Cherry-picked 8386b64]
1 parent a989460 commit 0374995

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,7 @@ object SpaceEngine {
786786

787787
def doShow(s: Space, flattenList: Boolean = false): String = s match {
788788
case Empty => "empty"
789-
case Typ(ConstantType(const : Constant), _) if const.tag == StringTag => "\"" + const.value + "\""
790-
case Typ(ConstantType(const : Constant), _) => "" + const.value
789+
case Typ(c: ConstantType, _) => c.value.show
791790
case Typ(tp: TermRef, _) =>
792791
if (flattenList && tp <:< defn.NilType) ""
793792
else tp.symbol.showName

0 commit comments

Comments
 (0)