Files
Alexey Belkov 186fe9f2fd [kotlin] "Variable declaration could be moved inside 'when'": don't report with complex initializer
^KTIJ-23935 Fixed

GitOrigin-RevId: 6ea1f59cf35054eb9a6a10b7f7157bbc91678cca
2023-06-08 16:02:18 +00:00

10 lines
160 B
Kotlin

// PROBLEM: none
fun foo() {
val a<caret> = when { true -> { 0 } else -> { 1 } }
when (a) {
1 -> {
}
else -> {
}
}
}