Files
kotlin-fork/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt
T
2020-03-10 15:19:34 +03:00

15 lines
221 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.KClass
fun box(): String {
try {
String::class.java as KClass<String>
} catch (e: Exception) {
return "OK"
}
return "fail"
}