Files
kotlin-fork/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.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

41 lines
884 B
Plaintext
Vendored

class Test : J {
constructor(j: J) /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun takeNotNull(x: @EnhancedNullability String) {
<this>.#<$$delegate_0>.takeNotNull(x = x)
}
override fun takeNullable(x: @FlexibleNullability String?) {
<this>.#<$$delegate_0>.takeNullable(x = x)
}
override fun takeFlexible(x: String?) {
<this>.#<$$delegate_0>.takeFlexible(x = x)
}
@NotNull
override fun returnNotNull(): @EnhancedNullability String {
return <this>.#<$$delegate_0>.returnNotNull()
}
@Nullable
override fun returnNullable(): @FlexibleNullability String? {
return <this>.#<$$delegate_0>.returnNullable()
}
override fun returnsFlexible(): String? {
return <this>.#<$$delegate_0>.returnsFlexible()
}
local /* final field */ val <$$delegate_0>: J = j
private val j: J
field = j
private get
}