mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
23 lines
346 B
Kotlin
Vendored
23 lines
346 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
inline fun inline1(crossinline action: () -> Unit) {
|
|
action();
|
|
{ action() }()
|
|
}
|
|
|
|
inline fun inline2(crossinline action: () -> Unit) = { action() }
|
|
|
|
|
|
// FILE: 2.kt
|
|
import test.*
|
|
|
|
var result = "fail"
|
|
fun box(): String {
|
|
inline1 { inline2 { result = "OK" }() }
|
|
|
|
return result
|
|
}
|
|
|