Files
kotlin/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt
2019-11-19 11:00:09 +03:00

13 lines
223 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
interface IFoo<T> {
fun foo(x: T): String
}
inline class Z(val x: Int) : IFoo<Z> {
override fun foo(x: Z) = "OK"
}
fun box(): String =
Z(1).foo(Z(2))