WhenWithOnlyElse: don't remove when subject variable if needed

#KT-30975 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-04-18 19:45:33 +09:00
committed by Dmitry Gridin
parent 7f1d30058a
commit e955dcfc14
44 changed files with 636 additions and 12 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
fun test() {
<caret>when (val a = 42) {
else -> {
use(a, a)
use(a, a)
}
}
val a = 33
}
fun use(i: Int, j: Int) {}