K2: reproduce KT-61443

This commit is contained in:
Mikhail Glukhikh
2023-09-13 15:38:32 +02:00
committed by Space Team
parent e79851910e
commit 1b9197dd17
6 changed files with 216 additions and 0 deletions
@@ -0,0 +1,47 @@
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>() */
}
}