File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -435,6 +435,9 @@ object Scanners {
435435 true
436436 }
437437
438+ def isContinuingParens () =
439+ openParensTokens.contains(token) && ! pastBlankLine && ! isScala2Mode
440+
438441 /** The indentation width of the given offset */
439442 def indentWidth (offset : Offset ): IndentWidth = {
440443 import IndentWidth .{Run , Conc }
@@ -532,7 +535,7 @@ object Scanners {
532535 && canEndStatTokens.contains(lastToken)
533536 && canStartStatTokens.contains(token)
534537 && ! isLeadingInfixOperator()
535- && ! (openParensTokens.contains(token) && lastWidth < nextWidth && ! pastBlankLine )
538+ && ! (lastWidth < nextWidth && isContinuingParens() )
536539 then
537540 insert(if (pastBlankLine) NEWLINES else NEWLINE , lineOffset)
538541 skipEndMarker(nextWidth)
You can’t perform that action at this time.
0 commit comments