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:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user