Files
kotlin/idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithWhen.kt
2014-04-17 19:01:20 +04:00

16 lines
233 B
Kotlin

// NEXT_SIBLING:
fun foo(a: Int): Int {
var b: Int = 1
<selection> when {
a > 0 -> {
b = b + 1
}
a < 0 -> {
b = b - 1
}
}
println(b)</selection>
return b
}