Files
kotlin/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericDefaultInterfaceMethodCall.kt
2018-11-08 15:00:32 +03:00

15 lines
273 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR, JS_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))