Files
kotlin-fork/idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithIfElse.kt
T
2014-06-23 21:10:12 +04:00

19 lines
274 B
Kotlin

// PARAM_TYPES: kotlin.Int
// PARAM_TYPES: kotlin.Int
// SIBLING:
fun foo(a: Int): Int {
var b: Int = 1
<selection>if (a > 0) {
b = b + 1
}
else if (a < 0) {
b--
}
else {
b = a
}
println(b)</selection>
return b
}