Skip to content

Commit 81e0a4e

Browse files
committed
Patch indentation when removing braces (essentials)
If the first indentation of the region is greater than the indentation of the enclosing region, we use it to indent the whole region. Otherwise we use the incremented indentation of the enclosing region. ```scala def foo = { x // we replicate indentation of x downward in region y } ``` ```scala def foo = { x // indentation of x is incorrect, we increment enclosing indentation y } ``` A bigger indentation than the required one is permitted except just after a closing brace. ```scala def bar = { x .toString // permitted indentation def foo = { } bar // must be unindented, to not fall into the body of foo } ``` And other bug fixes (see lampepfl#17522)
1 parent d5a7131 commit 81e0a4e

File tree

5 files changed

+244
-124
lines changed

5 files changed

+244
-124
lines changed

0 commit comments

Comments
 (0)