mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-06 15:53:19 +00:00
19 lines
309 B
Kotlin
Vendored
19 lines
309 B
Kotlin
Vendored
// NO_CHECK_LAMBDA_INLINING
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
inline fun test(s: () -> () -> () -> String = { { { "OK" } } }) =
|
|
s()
|
|
|
|
val same = test()
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
val inlined = test()
|
|
if (same()() != "OK") return "fail 1: ${same()()}"
|
|
return inlined()()
|
|
}
|