File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -680,7 +680,7 @@ object Parsers {
680
680
def checkNextNotIndented (): Unit =
681
681
if in.isNewLine then
682
682
val nextIndentWidth = in.indentWidth(in.next.offset)
683
- if in.currentRegion.indentWidth < nextIndentWidth then
683
+ if in.currentRegion.indentWidth < nextIndentWidth && in.currentRegion.closedBy == OUTDENT then
684
684
warning(em " Line is indented too far to the right, or a `{` or `:` is missing " , in.next.offset)
685
685
686
686
/* -------- REWRITES ----------------------------------------------------------- */
Original file line number Diff line number Diff line change
1
+ //> using options -Xfatal-warnings -no-indent
2
+
3
+ object Test {
4
+ 1 match {
5
+ case 1 =>
6
+ case class Test (name : String )
7
+ Nil
8
+ }
9
+ }
You can’t perform that action at this time.
0 commit comments