Files
kotlin-fork/compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt
T
2019-11-20 12:57:36 +01:00

20 lines
318 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: 1.kt
// SKIP_INLINE_CHECK_IN: inlineFun$default
// WITH_RUNTIME
package test
inline fun <reified T> inlineFun(lambda: () -> String = { T::class.java.simpleName }): String {
return lambda()
}
// FILE: 2.kt
import test.*
class OK
fun box(): String {
return inlineFun<OK>()
}