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.
55 lines
899 B
Plaintext
Vendored
55 lines
899 B
Plaintext
Vendored
annotation class Ann : Annotation {
|
|
constructor() /* primary */
|
|
|
|
}
|
|
|
|
interface IFoo {
|
|
@Ann
|
|
abstract val testVal: String
|
|
abstract get
|
|
|
|
@Ann
|
|
abstract fun testFun()
|
|
@Ann
|
|
abstract val String.testExtVal: String
|
|
abstract get
|
|
|
|
@Ann
|
|
abstract fun String.testExtFun()
|
|
|
|
}
|
|
|
|
class DFoo : IFoo {
|
|
constructor(d: IFoo) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
@Ann
|
|
override fun testFun() {
|
|
<this>.#<$$delegate_0>.testFun()
|
|
}
|
|
|
|
@Ann
|
|
override fun String.testExtFun() {
|
|
(<this>.#<$$delegate_0>, <this>).testExtFun()
|
|
}
|
|
|
|
@Ann
|
|
override val testVal: String
|
|
override get(): String {
|
|
return <this>.#<$$delegate_0>.<get-testVal>()
|
|
}
|
|
|
|
@Ann
|
|
override val String.testExtVal: String
|
|
override get(): String {
|
|
return (<this>.#<$$delegate_0>, <this>).<get-testExtVal>()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: IFoo = d
|
|
|
|
}
|
|
|