File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3133,8 +3133,8 @@ object Parsers {
31333133 buf.toList
31343134 }
31353135
3136- /** CaseClause ::= ‘case’ Pattern [Guard] (‘with’ SimpleExpr SubMatchClause | `=>' Block)
3137- * ExprCaseClause ::= ‘case’ Pattern [Guard] (‘with’ SimpleExpr SubMatchClause | `=>' Expr)
3136+ /** CaseClause ::= ‘case’ Pattern [Guard] (‘if’ InfixExpr MatchClause | `=>' Block)
3137+ * ExprCaseClause ::= ‘case’ Pattern [Guard] (‘if’ InfixExpr MatchClause | `=>' Expr)
31383138 */
31393139 def caseClause (exprOnly : Boolean = false ): CaseDef = atSpan(in.offset) {
31403140 val (pat, grd) = inSepRegion(InCase ) {
Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
566566 }
567567 case CaseDef (pat, guard, body) =>
568568 val bodyText = body match
569- case t : SubMatch => keywordStr(" with " ) ~ toText(t)
569+ case t : SubMatch => keywordStr(" if " ) ~ toText(t)
570570 case t => " => " ~ caseBlockText(t)
571571 keywordStr(" case " ) ~ inPattern(toText(pat)) ~ optText(guard)(keywordStr(" if " ) ~ _) ~ bodyText
572572 case Labeled (bind, expr) =>
You can’t perform that action at this time.
0 commit comments