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

6 lines
112 B
Plaintext

fun foo(style: Int): Int {
return when (val a = style) { // comment
0 -> 0
else -> a
}
}