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
This commit is contained in:
Zalim Bashorov
2016-10-04 17:39:37 +03:00
parent ace10f46b2
commit 3c520a3ce3
14 changed files with 310 additions and 21 deletions
+14
View File
@@ -0,0 +1,14 @@
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"
}