mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
23 lines
494 B
Kotlin
Vendored
23 lines
494 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_RUNTIME
|
|
|
|
data class A(val x: Int) {
|
|
fun toString(other: Any): String = ""
|
|
}
|
|
|
|
data class B(val x: Int) {
|
|
fun toString(other: B, another: Any): String = ""
|
|
}
|
|
|
|
fun box(): String {
|
|
A::class.java.getDeclaredMethod("toString")
|
|
A::class.java.getDeclaredMethod("toString", Any::class.java)
|
|
|
|
B::class.java.getDeclaredMethod("toString")
|
|
B::class.java.getDeclaredMethod("toString", B::class.java, Any::class.java)
|
|
|
|
return "OK"
|
|
}
|