Support class literals (A::class)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import kotlin.reflect.jvm.*
|
||||
|
||||
class A
|
||||
|
||||
fun box(): String {
|
||||
val a1 = javaClass<A>().kotlin
|
||||
val a2 = A::class
|
||||
|
||||
if (a1 != a2) return "Fail equals"
|
||||
if (a1.hashCode() != a2.hashCode()) return "Fail hashCode"
|
||||
if (a1.toString() != a2.toString()) return "Fail toString"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user