Files
kotlin-fork/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.fir.kt.txt
T
Mikhail Glukhikh d4b0688690 FIR: introduce delegate field initializers
Before this commit we initialized delegate fields in primary constructor,
that could provoke NPE in case delegate is used in initializer of
some property backing field.
Now we initialize delegate fields directly instead.
2021-02-08 14:28:27 +03:00

39 lines
494 B
Plaintext
Vendored

interface IFooBar {
abstract fun foo()
abstract fun bar()
}
object FooBarImpl : IFooBar {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun foo() {
}
override fun bar() {
}
}
class C : IFooBar {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun foo() {
<this>.#<$$delegate_0>.foo()
}
local /* final field */ val <$$delegate_0>: IFooBar = FooBarImpl
override fun bar() {
}
}