Files
kotlin/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericDefaultInterfaceMethodCall.kt
2020-04-27 11:50:24 +03:00

14 lines
240 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
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))