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 {
435
435
true
436
436
}
437
437
438
+ def isContinuingParens () =
439
+ openParensTokens.contains(token) && ! pastBlankLine && ! isScala2Mode
440
+
438
441
/** The indentation width of the given offset */
439
442
def indentWidth (offset : Offset ): IndentWidth = {
440
443
import IndentWidth .{Run , Conc }
@@ -532,7 +535,7 @@ object Scanners {
532
535
&& canEndStatTokens.contains(lastToken)
533
536
&& canStartStatTokens.contains(token)
534
537
&& ! isLeadingInfixOperator()
535
- && ! (openParensTokens.contains(token) && lastWidth < nextWidth && ! pastBlankLine )
538
+ && ! (lastWidth < nextWidth && isContinuingParens() )
536
539
then
537
540
insert(if (pastBlankLine) NEWLINES else NEWLINE , lineOffset)
538
541
skipEndMarker(nextWidth)
You can’t perform that action at this time.
0 commit comments