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

23 lines
365 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
public inline fun <R> runTest(f: () -> R): R {
return f()
}
public inline fun <R> minByTest(f: (Int) -> R): R {
var minValue = f(1)
val v = f(1)
return v
}
// FILE: 2.kt
fun box(): String {
val result = runTest{minByTest<Int> { it }}
if (result != 1) return "test1: ${result}"
return "OK"
}