mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
24 lines
439 B
Kotlin
Vendored
24 lines
439 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
interface IFoo {
|
|
fun foo(): String
|
|
}
|
|
|
|
interface IBar {
|
|
fun bar(): String
|
|
}
|
|
|
|
enum class Test : IFoo, IBar {
|
|
FOO {
|
|
// FOO referenced from inner class constructor with initialized 'this',
|
|
// in delegate initializer
|
|
inner class Inner : IFoo by FOO
|
|
|
|
val z = Inner()
|
|
|
|
override fun foo() = "OK"
|
|
|
|
override fun bar() = z.foo()
|
|
}
|
|
}
|
|
|
|
fun box() = Test.FOO.bar() |