Indent content of when (KT-14066)

#KT-14066 Fixed
This commit is contained in:
Nikolay Krasko
2018-06-21 15:58:00 +03:00
parent dc8a3ab534
commit 1973860e70
8 changed files with 130 additions and 10 deletions
+58
View File
@@ -0,0 +1,58 @@
fun foo(i: Int) {
when {
// line
1 -> 2
// One line before
2 -> 3
// Many lines before
3 -> 4
/* Block */
4 -> 5
/*
Block multiline
*/
5 -> 6
/** Doc */
6 -> 7
}
when { // Assigned to entry
1 -> 2
}
when {
// Line
else -> 8
}
when {
/* Block */
else -> 8
}
when {
/**
* Doc
*/
else -> 8
}
when {
1 ->
2 // Two
else ->
43 // 42
}
}