mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
36 lines
689 B
Kotlin
Vendored
36 lines
689 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JS_IR, JS, NATIVE
|
|
// WITH_REFLECT
|
|
package test
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
interface I1 {
|
|
fun f()
|
|
val x: Int
|
|
}
|
|
|
|
interface I2 {
|
|
fun f()
|
|
val x: Int
|
|
}
|
|
|
|
interface I3 {
|
|
fun f()
|
|
val x: Int
|
|
}
|
|
|
|
interface I : I2, I1, I3
|
|
|
|
fun box(): String {
|
|
assertEquals("fun test.I.f(): kotlin.Unit", I::f.toString())
|
|
assertEquals("val test.I.x: kotlin.Int", I::x.toString())
|
|
|
|
val f = I::class.members.single { it.name == "f" }
|
|
assertEquals("fun test.I.f(): kotlin.Unit", f.toString())
|
|
val x = I::class.members.single { it.name == "x" }
|
|
assertEquals("val test.I.x: kotlin.Int", x.toString())
|
|
|
|
return "OK"
|
|
}
|