If to when: do not add label to outer loop if not necessary
So #KT-24767 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
fun test() {
|
||||
for (i in -2..2) {
|
||||
<caret>if (i > 0) i.hashCode()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun test() {
|
||||
for (i in -2..2) {
|
||||
when {
|
||||
i > 0 -> i.hashCode()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user