We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60c3a12 commit 338c504Copy full SHA for 338c504
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -712,8 +712,9 @@ object Parsers {
712
val (startOpening, endOpening) = startingElimRegion(colonRequired)
713
val isOutermost = in.currentRegion.isOutermost
714
def allBraces(r: Region): Boolean = r match {
715
+ case r: Indented => r.isOutermost || allBraces(r.enclosing)
716
case r: InBraces => allBraces(r.enclosing)
- case _ => r.isOutermost
717
+ case _ => false
718
}
719
var canRewrite = allBraces(in.currentRegion) && // test (1)
720
!testChars(in.lastOffset - 3, " =>") // test(6)
0 commit comments