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

19 lines
308 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: NATIVE
// WITH_RUNTIME
// WITH_REFLECT
// FILE: 1.kt
package test
inline val <reified T: Any> T.value: String
get() = T::class.simpleName!!
// FILE: 2.kt
import test.*
class OK
fun box(): String {
return OK().value ?: "fail"
}