Files
kotlin-fork/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.kt.txt
T
Dmitriy Novozhilov bd66b96f8a [FIR] Set EnhancedNullability attribute for former flexible types
In some cases we transform flexible type into non-flexible during
  enhancement, but don't add `@EnhancedNullability` attribute to them,
  which breaks consistency with K1 on IR level

This commit fixes it

^KT-65302
2024-02-21 12:04:11 +00:00

40 lines
830 B
Kotlin
Vendored

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