Files
kotlin-fork/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.kt.txt
T
Steven Schäfer a7ba081d22 FIR: Fix interface delegation ABI
- Unifies the name of the `$$delegate_<n>` field between K1 and K2.
- Make the `$$delegate_<n>` field private
2022-12-02 21:54:18 +00:00

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