Files
kotlin-fork/js/js.translator/testData/box/reflection/kClass.kt
T
Zalim Bashorov 3c520a3ce3 JS backend: basic support for class literals.
Added:
* the ability to get KClass using class literals (`::class`);
* the ability to get KClass from JsClass and vice versa;
* the ability to get simpleName.

 #KT-13345 Fixed
2016-10-14 19:44:53 +03:00

15 lines
347 B
Kotlin
Vendored

package foo
fun box(): String {
check(A::class, A()::class)
check(B::class, B()::class)
check(O::class, (O)::class)
assertNotEquals(null, I::class)
check(E::class, E.X::class)
check(E::class, E.Y::class, shouldBeEqual = false)
// TODO uncomment after KT-13338 is fixed
// check(E::class, E.Z::class)
return "OK"
}