Support KClass.isInstance/cast/safeCast in stdlib-only reflection implementation

#KT-14720 Fixed
This commit is contained in:
Alexander Udalov
2019-10-24 19:37:29 +02:00
parent 5c89f2fa54
commit 896512f7cd
10 changed files with 80 additions and 42 deletions
@@ -1,10 +1,10 @@
// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi
// TARGET_BACKEND: JVM
// WITH_REFLECT
// WITH_RUNTIME
import kotlin.reflect.KClass
import kotlin.reflect.full.cast
import kotlin.reflect.full.safeCast
import kotlin.reflect.cast
import kotlin.reflect.safeCast
import kotlin.test.*
fun testInstance(value: Any?, klass: KClass<*>) {