Options for blank lines between 'when' branches
#KT-18607 Fixed
This commit is contained in:
@@ -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
@@ -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
@@ -57,4 +57,4 @@ fun some(x: Any) {
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -65,4 +65,4 @@ else
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user