mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
18 lines
259 B
Kotlin
Vendored
18 lines
259 B
Kotlin
Vendored
// NO_CHECK_LAMBDA_INLINING
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
inline fun <T> test(p: T, s: () -> () -> T = { { p } }) =
|
|
s()
|
|
|
|
val same = test("O")
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
val inlined = test("K")
|
|
return same() + inlined()
|
|
}
|