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

21 lines
326 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
package test
@Suppress("NULLABLE_INLINE_PARAMETER")
inline fun build(func: () -> Unit, pathFunc: (() -> String)? = null) {
func()
pathFunc?.invoke()
}
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
build ({ result = "OK" })
return result
}