d4b0688690
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.
39 lines
494 B
Plaintext
Vendored
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() {
|
|
}
|
|
|
|
}
|
|
|