FIR2IR: generate type arguments in delegation calls

This commit is contained in:
Mikhail Glukhikh
2021-12-03 13:40:44 +03:00
parent c57df1ac40
commit 85240bdb06
8 changed files with 32 additions and 21 deletions
@@ -17,20 +17,20 @@ class Test1<E : Any?> : IBase<E> {
}
override fun <B : Any?> foo(a: E, b: B) {
<this>.#<$$delegate_0>.foo</* null */>(a = a, b = b)
<this>.#<$$delegate_0>.foo<B>(a = a, b = b)
}
override val <C : Any?> C.id: Map<E, C>?
override get(): Map<E, C>? {
return (<this>.#<$$delegate_0>, <this>).<get-id></* null */>()
return (<this>.#<$$delegate_0>, <this>).<get-id><C>()
}
override var <D : Any?> List<D>.x: D?
override get(): D? {
return (<this>.#<$$delegate_0>, <this>).<get-x></* null */>()
return (<this>.#<$$delegate_0>, <this>).<get-x><D>()
}
override set(<set-?>: D?) {
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
(<this>.#<$$delegate_0>, <this>).<set-x><D>(<set-?> = <set-?>)
}
local /* final field */ val <$$delegate_0>: IBase<E> = i
@@ -45,20 +45,20 @@ class Test2 : IBase<String> {
}
override fun <B : Any?> foo(a: String, b: B) {
<this>.#<$$delegate_0>.foo</* null */>(a = a, b = b)
<this>.#<$$delegate_0>.foo<B>(a = a, b = b)
}
override val <C : Any?> C.id: Map<String, C>?
override get(): Map<String, C>? {
return (<this>.#<$$delegate_0>, <this>).<get-id></* null */>()
return (<this>.#<$$delegate_0>, <this>).<get-id><C>()
}
override var <D : Any?> List<D>.x: D?
override get(): D? {
return (<this>.#<$$delegate_0>, <this>).<get-x></* null */>()
return (<this>.#<$$delegate_0>, <this>).<get-x><D>()
}
override set(<set-?>: D?) {
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
(<this>.#<$$delegate_0>, <this>).<set-x><D>(<set-?> = <set-?>)
}
local /* final field */ val <$$delegate_0>: IBase<String> = j