Files
kotlin/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt
2016-11-09 21:41:12 +03:00

16 lines
293 B
Kotlin
Vendored

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