Files
kotlin-fork/compiler/testData/codegen/boxInline/defaultValues/kt11479.kt
T
2018-06-28 12:26:41 +02:00

26 lines
334 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
package test
inline fun log(lazyMessage: () -> Any?) {
lazyMessage()
}
// FILE: 2.kt
import test.*
inline fun getOrCreate(
z : Boolean = false,
s: () -> String
) {
log { s() }
}
fun box(): String {
var z = "fail"
getOrCreate { z = "OK"; z }
return z
}