Files
kotlin-fork/compiler/testData/ir/irText/firProblems/substitutionOverrideWithDelegate.fir.kt.txt
T
Dmitriy Novozhilov 3d6ec0ec75 [FIR2IR] Automatically store IR declaration in its parent upon creation
Previously, creating a declaration with Fir2IrCallableDeclarationsGenerator/
  Fir2IrClassifiersGenerator didn't guarantee that this declaration will
  be actually added to the list of parent class/file declarations, which
  lead to situations when FIR2IR created some declarations in the air
  (mostly fake-overrides)
2023-10-17 12:46:27 +00:00

49 lines
710 B
Kotlin
Vendored

fun foo() {
return DelegatedB().invoke()
}
interface A {
operator fun invoke() {
}
operator fun invoke(value: String) {
return <this>.bar(value = value)
}
}
fun A.bar(value: String) {
}
open class DelegatedB : B<String> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
private /* final field */ val $$delegate_0: C<String> = C<String>()
override operator fun invoke() {
<this>.#$$delegate_0.invoke()
}
override operator fun invoke(value: String) {
<this>.#$$delegate_0.invoke(value = value)
}
}
interface B<out T : Any?> : A {
}
class C<out T : Any?> : B<T> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}