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

13 lines
220 B
Kotlin

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