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

11 lines
191 B
Kotlin

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