mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
15 lines
273 B
Kotlin
Vendored
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))
|