Files
kotlin-fork/compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt
T
Alexey Sedunov d815634233 Control-Flow: Assign pseudo-values to local functions (except those
declared directly in the block)
2015-04-21 17:10:46 +03:00

8 lines
130 B
Kotlin
Vendored

fun test(b: Boolean): (Int) -> Int {
if (b) {
fun(n: Int) = n + 1
}
else {
fun(n: Int) = n - 1
}
}