Options for blank lines between 'when' branches

#KT-18607 Fixed
This commit is contained in:
Dmitry Jemerov
2017-06-22 14:59:09 +02:00
parent 8fe2858c6a
commit 6a96ade02c
8 changed files with 72 additions and 12 deletions
+13
View File
@@ -0,0 +1,13 @@
fun f(x: Int) = when (x) {
1 -> "Foo"
2 -> "Bar"
3 -> {
"Foo"
}
4 -> "Bar"
else -> "Xyzzy"
}
// SET_INT: BLANK_LINES_AROUND_BLOCK_WHEN_BRANCHES = 1
+11
View File
@@ -0,0 +1,11 @@
fun f(x: Int) = when(x) {
1 -> "Foo"
2 -> "Bar"
3 -> {
"Foo"
}
4 -> "Bar"
else -> "Xyzzy"
}
// SET_INT: BLANK_LINES_AROUND_BLOCK_WHEN_BRANCHES = 1
+1 -1
View File
@@ -57,4 +57,4 @@ fun some(x: Any) {
1
}
}
}
}
+1 -1
View File
@@ -65,4 +65,4 @@ else
1
}
}
}
}