3c520a3ce3
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
38 lines
556 B
Kotlin
Vendored
38 lines
556 B
Kotlin
Vendored
package foo
|
|
|
|
open class A
|
|
|
|
class B : A() {
|
|
val a = 1
|
|
}
|
|
|
|
object O
|
|
|
|
interface I
|
|
|
|
enum class E {
|
|
X,
|
|
Y {
|
|
val a = 1
|
|
},
|
|
Z {}
|
|
}
|
|
|
|
@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)
|
|
}
|
|
}
|