We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c5b00d commit b734acdCopy full SHA for b734acd
compiler/src/dotty/tools/dotc/parsing/Scanners.scala
@@ -617,6 +617,7 @@ object Scanners {
617
if nextWidth < lastWidth then currentRegion = topLevelRegion(nextWidth)
618
else if !isLeadingInfixOperator(nextWidth) && !statCtdTokens.contains(lastToken) && lastToken != INDENT then
619
currentRegion match
620
+ case _ if token == EOF => // no OUTDENT at EOF
621
case r: Indented =>
622
insert(OUTDENT, offset)
623
handleNewIndentWidth(r.enclosing, ir =>
tests/pos/i22332.scala
@@ -0,0 +1,5 @@
1
+
2
+object Foo:
3
+ val foo = 42
4
+ // one space
5
0 commit comments