mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-14 00:21:34 +00:00
12 lines
245 B
Kotlin
Vendored
12 lines
245 B
Kotlin
Vendored
// PARAM_TYPES: kotlin.Int
|
|
// PARAM_DESCRIPTOR: val b: kotlin.Int defined in foo
|
|
// SIBLING:
|
|
fun foo(a: Int): Int {
|
|
val b: Int = 1
|
|
return when (a + b) {
|
|
0 -> <selection>b</selection>
|
|
1 -> -b
|
|
else -> a - b
|
|
}
|
|
}
|