If to when: do not add label to outer loop if not necessary

So #KT-24767 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-06-04 18:37:59 +03:00
parent b4962a1880
commit 24008cdffb
4 changed files with 21 additions and 1 deletions
@@ -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()
}
}
}