Files
kotlin/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericDefaultInterfaceMethodCall.kt
2019-01-16 12:11:28 +03:00

15 lines
266 B
Kotlin
Vendored

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