KT-12040 "Replace when with if" produce invalid code for first entry which has comment
#KT-12040 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
fun foo(a: Int) {
|
||||
<caret>when (a) {
|
||||
// some comment
|
||||
0 -> bar(a)
|
||||
|
||||
// another comment
|
||||
1 -> bar(a)
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(p: Int){}
|
||||
@@ -0,0 +1,10 @@
|
||||
fun foo(a: Int) {
|
||||
if (a
|
||||
// some comment
|
||||
== 0) bar(a)
|
||||
|
||||
// another comment
|
||||
else if (a == 1) bar(a)
|
||||
}
|
||||
|
||||
fun bar(p: Int){}
|
||||
Reference in New Issue
Block a user