Files
kotlin-fork/idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop2.kt
T
Mikhail Glukhikh 7b2a66c006 Convert 'simplify when' from intention to inspection
Related to KT-20492
2017-11-10 15:34:11 +03:00

21 lines
331 B
Kotlin
Vendored

// WITH_RUNTIME
fun test(i: Int) {
val x = <caret>when {
i == 1 -> {
println(1)
1
}
false -> {
println(2)
2
}
true -> {
println(3)
3
}
else -> {
println(4)
4
}
}
}