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:
@@ -20,3 +20,18 @@ enum class E {
|
||||
|
||||
@JsName("Q")
|
||||
class R
|
||||
|
||||
fun check(x: Any, y: Any, shouldBeEqual: Boolean = true, shouldBeSame: Boolean = true) {
|
||||
assertNotEquals(null, x)
|
||||
assertNotEquals(null, y)
|
||||
if (shouldBeEqual) {
|
||||
assertEquals(x, y)
|
||||
|
||||
if (shouldBeSame && x !== y) {
|
||||
fail("Expected same instances, got expected = '$x', actual = '$y'")
|
||||
}
|
||||
}
|
||||
else {
|
||||
assertNotEquals(x, y)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user