Files
kotlin-fork/compiler/testData/codegen/boxInline/reified/kt9637_2.kt
T
2018-08-28 13:48:43 +03:00

24 lines
331 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
package test
import kotlin.reflect.KClass
inline fun <reified T : Any> injectFnc(): KClass<T> = {
T::class
} ()
public class Box
// FILE: 2.kt
import test.*
fun box(): String {
val boxClass = injectFnc<Box>()
if (boxClass != Box::class) return "fail 1"
return "OK"
}