c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
22 lines
455 B
Kotlin
Vendored
22 lines
455 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_STDLIB
|
|
|
|
data class A(val x: Int) {
|
|
fun hashCode(other: Any): Int = 0
|
|
}
|
|
|
|
data class B(val x: Int) {
|
|
fun hashCode(other: B, another: Any): Int = 0
|
|
}
|
|
|
|
fun box(): String {
|
|
A::class.java.getDeclaredMethod("hashCode")
|
|
A::class.java.getDeclaredMethod("hashCode", Any::class.java)
|
|
|
|
B::class.java.getDeclaredMethod("hashCode")
|
|
B::class.java.getDeclaredMethod("hashCode", B::class.java, Any::class.java)
|
|
|
|
return "OK"
|
|
}
|