Skip to content

Commit c2538e8

Browse files
authored
Merge pull request #12136 from dotty-staging/fix-12090
Document indentation after old-style if, while, for
2 parents 6593a10 + d4f888e commit c2538e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/docs/reference/other-new-features/indentation.md

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ There are two rules:
6868
if match return then throw try while yield
6969
```
7070

71+
- after the closing `)` of a condition in an old-style `if` or `while`.
72+
- after the closing `)` or `}` of the enumerations of an old-style `for` loop without a `do`.
73+
7174
If an `<indent>` is inserted, the indentation width of the token on the next line
7275
is pushed onto `IW`, which makes it the new current indentation width.
7376

0 commit comments

Comments
 (0)