Files
kotlin/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt
2018-06-09 19:15:38 +03:00

17 lines
326 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_REFLECT
import kotlin.reflect.KClass
fun box(): String {
try {
String::class.java as KClass<String>
} catch (e: Exception) {
return "OK"
}
return "fail"
}