We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62ffcd5 commit 64d613bCopy full SHA for 64d613b
compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
@@ -166,7 +166,10 @@ class PlainPrinter(_ctx: Context) extends Printer {
166
changePrec(OrTypePrec) { toText(tp1) ~ " | " ~ atPrec(OrTypePrec + 1) { toText(tp2) } }
167
case MatchType(bound, scrutinee, cases) =>
168
changePrec(GlobalPrec) {
169
- def caseText(tp: Type): Text = "case " ~ toText(tp)
+ def caseText(tp: Type): Text = tp match {
170
+ case defn.MatchCase(pat, body) => "case " ~ toText(pat) ~ " => " ~ toText(body)
171
+ case _ => "case " ~ toText(tp)
172
+ }
173
def casesText = Text(cases.map(caseText), "\n")
174
atPrec(InfixPrec) { toText(scrutinee) } ~
175
keywordStr(" match ") ~ "{" ~ casesText ~ "}" ~
0 commit comments