mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 15:51:01 +00:00
14 lines
181 B
Kotlin
Vendored
14 lines
181 B
Kotlin
Vendored
// expected: rv: 2
|
|
fun foo(l: (Int) -> Int ): Int {
|
|
return l(1)
|
|
}
|
|
|
|
fun bar(p: Int): Int {
|
|
return p + 1
|
|
}
|
|
|
|
fun main(): Int {
|
|
return foo { x -> bar(x) }
|
|
}
|
|
|
|
val rv = main() |