Support KClass.simpleName in stdlib-only reflection implementation

#KT-33646 Fixed
This commit is contained in:
Alexander Udalov
2019-10-24 18:33:46 +02:00
parent e146d308db
commit c164745301
15 changed files with 138 additions and 77 deletions
@@ -17,11 +17,11 @@ fun n11() = (Foo::func)(Foo(""))
fun y01() = Foo::prop.<!NO_REFLECTION_IN_CLASS_PATH!>getter<!>
fun y02() = Foo::class.<!NO_REFLECTION_IN_CLASS_PATH!>members<!>
fun y03() = Foo::class.<!NO_REFLECTION_IN_CLASS_PATH!>simpleName<!>
fun y03() = Foo::class.simpleName
fun y04() = Foo::class.<!UNRESOLVED_REFERENCE!>properties<!>
fun <T : Any> kclass(k: KClass<*>, kt: KClass<T>) {
k.<!NO_REFLECTION_IN_CLASS_PATH!>simpleName<!>
k.simpleName
k.<!NO_REFLECTION_IN_CLASS_PATH!>qualifiedName<!>
k.<!NO_REFLECTION_IN_CLASS_PATH!>members<!>
k.<!NO_REFLECTION_IN_CLASS_PATH!>constructors<!>