KT-5717 "Replace 'when' with 'if'" loses a comment

#KT-5717 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-02-11 21:36:45 +03:00
parent 0809be59df
commit 0ed8eb0512
4 changed files with 27 additions and 2 deletions
@@ -0,0 +1,8 @@
fun foo(b: Boolean) {
<caret>when {
// comment 1
b -> 1 // comment 2
else -> 2
}
}
@@ -0,0 +1,5 @@
fun foo(b: Boolean) {
if (// comment 1
b) 1 // comment 2
else 2
}