We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4554131 + 767fc35 commit 0ea0ebaCopy full SHA for 0ea0eba
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -2192,7 +2192,8 @@ object Parsers {
2192
def condExpr(altToken: Token): Tree =
2193
val t: Tree =
2194
if in.token == LPAREN then
2195
- var t: Tree = atSpan(in.offset) { Parens(inParens(exprInParens())) }
+ var t: Tree = atSpan(in.offset):
2196
+ makeTupleOrParens(inParensWithCommas(commaSeparated(exprInParens)))
2197
if in.token != altToken then
2198
if toBeContinued(altToken) then
2199
t = inSepRegion(InCond) {
tests/pos/if-parse.scala
@@ -0,0 +1,4 @@
1
+import scala.math.Ordering.Implicits.infixOrderingOps
2
+
3
+def test =
4
+ if (1, 2) < (3, 4) then 1 else 2
0 commit comments