[IR] dumpKotlinLike: add testdata for FIR tests

This commit is contained in:
Zalim Bashorov
2020-11-20 18:18:14 +03:00
committed by teamcityserver
parent d7bd4240e1
commit c68040753d
298 changed files with 12186 additions and 0 deletions
@@ -0,0 +1,73 @@
interface IBase<A : Any?> {
abstract fun <B : Any?> foo(a: A, b: B)
abstract val <C : Any?> C.id: Map<A, C>?
abstract get
abstract var <D : Any?> List<D>.x: D?
abstract get
abstract set
}
class Test1<E : Any?> : IBase<E> {
constructor(i: IBase<E>) /* primary */ {
super/*Any*/()
/* <init>() */
<this>.#<$$delegate_0> = i
}
override fun <B : Any?> foo(a: E, b: B) {
<this>.#<$$delegate_0>.foo</* null */>(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 */>()
}
override var <D : Any?> List<D>.x: D?
override get(): D? {
return (<this>.#<$$delegate_0>, <this>).<get-x></* null */>()
}
override set(<set-?>: D?) {
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
}
local /*final field*/ val <$$delegate_0>: IBase<E>
}
class Test2 : IBase<String> {
constructor(j: IBase<String>) /* primary */ {
super/*Any*/()
/* <init>() */
<this>.#<$$delegate_0> = j
}
var j: IBase<String>
field = j
get
set
override fun <B : Any?> foo(a: String, b: B) {
<this>.#<$$delegate_0>.foo</* null */>(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 */>()
}
override var <D : Any?> List<D>.x: D?
override get(): D? {
return (<this>.#<$$delegate_0>, <this>).<get-x></* null */>()
}
override set(<set-?>: D?) {
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
}
local /*final field*/ val <$$delegate_0>: IBase<String>
}