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

24 lines
385 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
// WITH_RUNTIME
package test
inline fun <reified R> foo() = bar<R>() {"OK"}
inline fun <reified E> bar(crossinline y: () -> String) = {
null is E
run(y)
}
public inline fun <T> call(f: () -> T): T = f()
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
val x: () -> String = foo<String>()
fun box(): String {
return x()
}