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

25 lines
390 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: NATIVE
// FILE: 1.kt
// WITH_REFLECT
package test
public inline fun <reified T : Any> inlineMeIfYouCan(): String? =
{
f {
T::class.java.getName()
}
}()
inline fun f(x: () -> String) = x()
// FILE: 2.kt
import test.*
class OK
fun box(): String {
return inlineMeIfYouCan<OK>()!!
}