We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 29c9888 + bcbbf0a commit 6be74d3Copy full SHA for 6be74d3
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -2099,7 +2099,8 @@ object Parsers {
2099
def condExpr(altToken: Token): Tree =
2100
val t: Tree =
2101
if in.token == LPAREN then
2102
- var t: Tree = atSpan(in.offset) { Parens(inParens(exprInParens())) }
+ var t: Tree = atSpan(in.offset):
2103
+ makeTupleOrParens(inParensWithCommas(commaSeparated(exprInParens)))
2104
if in.token != altToken then
2105
if toBeContinued(altToken) then
2106
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