Support KClass.simpleName and built-in class literals

This commit is contained in:
Alexander Udalov
2015-03-07 03:45:46 +03:00
parent 6e45c6f17c
commit b93b9bd565
9 changed files with 84 additions and 2 deletions
@@ -0,0 +1,14 @@
class Klass
fun box(): String {
val x = Klass::class
if (x.simpleName != "Klass") return "Fail x: ${x.simpleName}"
val y = java.util.Date::class
if (y.simpleName != "Date") return "Fail y: ${y.simpleName}"
val z = kotlin.jvm.internal.KotlinSyntheticClass.Kind::class
if (z.simpleName != "Kind") return "Fail z: ${z.simpleName}"
return "OK"
}