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.
125 lines
1.8 KiB
Plaintext
Vendored
125 lines
1.8 KiB
Plaintext
Vendored
interface IFoo {
|
|
abstract fun foo(): String
|
|
|
|
}
|
|
|
|
class K1 : JFoo {
|
|
constructor() /* primary */ {
|
|
super/*JFoo*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class K2 : JFoo {
|
|
constructor() /* primary */ {
|
|
super/*JFoo*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): @FlexibleNullability String {
|
|
return super.foo()
|
|
}
|
|
|
|
}
|
|
|
|
class K3 : JUnrelatedFoo, IFoo {
|
|
constructor() /* primary */ {
|
|
super/*JUnrelatedFoo*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class K4 : JUnrelatedFoo, IFoo {
|
|
constructor() /* primary */ {
|
|
super/*JUnrelatedFoo*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): String? {
|
|
return super.foo()
|
|
}
|
|
|
|
}
|
|
|
|
class TestJFoo : IFoo {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): String {
|
|
return <this>.#<$$delegate_0>.foo()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: IFoo = JFoo()
|
|
|
|
}
|
|
|
|
class TestK1 : IFoo {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): String {
|
|
return <this>.#<$$delegate_0>.foo()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: IFoo = K1()
|
|
|
|
}
|
|
|
|
class TestK2 : IFoo {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): String {
|
|
return <this>.#<$$delegate_0>.foo()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: IFoo = K2()
|
|
|
|
}
|
|
|
|
class TestK3 : IFoo {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): String {
|
|
return <this>.#<$$delegate_0>.foo()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: IFoo = K3()
|
|
|
|
}
|
|
|
|
class TestK4 : IFoo {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun foo(): String {
|
|
return <this>.#<$$delegate_0>.foo()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: IFoo = K4()
|
|
|
|
}
|
|
|