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.
2 parents 55c87ca + 735da57 commit 94b0d90Copy full SHA for 94b0d90
docs/docs/reference/other-new-features/indentation.md
@@ -74,6 +74,11 @@ There are two rules:
74
75
- the first token on the next line has an indentation width strictly less
76
than the current indentation width, and
77
+ - the last token on the previous line is not one of the following tokens
78
+ which indicate that the previous statement continues:
79
+ ```
80
+ then else do catch finally yield match
81
82
- the first token on the next line is not a
83
[leading infix operator](../changed-features/operators.html).
84
tests/neg/i9790.scala
@@ -0,0 +1,7 @@
1
+object A:
2
+ def fn: Unit =
3
+ if true then
4
+ println(1)
5
+ println(2) // error: start of line does not match previous indentation widths
6
+ else
7
+ println(2)
0 commit comments