Files
kotlin/compiler/testData/codegen/box/classes/delegationGenericArg.kt
2019-11-19 11:00:09 +03:00

14 lines
272 B
Kotlin
Vendored

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