Files
kotlin-fork/compiler/testData/codegen/box/classes/delegationGenericLongArg.kt
T
2018-06-28 12:26:41 +02:00

15 lines
344 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
interface A<T, U> {
fun foo(t: T, u: U): String
}
class Derived(a: A<Long, Int>) : A<Long, Int> by a
fun box(): String {
val o = object : A<Long, Int> {
override fun foo(t: Long, u: Int) = if (t == u.toLong()) "OK" else "Fail $t $u"
}
return Derived(o).foo(42, 42)
}