Skip to content

Commit 390d414

Browse files
SporarumKordyjan
authored andcommitted
Update indentation.md
[Cherry-picked 28d207d]
1 parent 1237b16 commit 390d414

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ Indentation can be mixed freely with braces `{...}`, as well as brackets `[...]`
274274
For instance, consider:
275275
```scala
276276
{
277-
val x = f(x: Int, y =>
277+
val x = 4
278+
f(x: Int, y =>
278279
x * (
279280
y + 1
280281
) +
@@ -283,13 +284,13 @@ For instance, consider:
283284
)
284285
}
285286
```
286-
- Here, the indentation width of the region enclosed by the braces is 3 (i.e. the indentation width of the
287+
- Here, the indentation width of the region enclosed by the braces is 2 (i.e. the indentation width of the
287288
statement starting with `val`).
288-
- The indentation width of the region in parentheses that follows `f` is also 3, since the opening
289+
- The indentation width of the region in parentheses that follows `f` is also 2, since the opening
289290
parenthesis is not at the end of a line.
290-
- The indentation width of the region in parentheses around `y + 1` is 9
291+
- The indentation width of the region in parentheses around `y + 1` is 6
291292
(i.e. the indentation width of `y + 1`).
292-
- Finally, the indentation width of the last region in parentheses starting with `(x` is 6 (i.e. the indentation width of the indented region following the `=>`.
293+
- Finally, the indentation width of the last region in parentheses starting with `(x` is 4 (i.e. the indentation width of the indented region following the `=>`.
293294
294295
## Special Treatment of Case Clauses
295296

0 commit comments

Comments
 (0)