[IR] dumpKotlinLike: add testdata for FIR tests
This commit is contained in:
committed by
teamcityserver
parent
d7bd4240e1
commit
c68040753d
@@ -0,0 +1,9 @@
|
||||
fun <K1 : Any?, V1 : Any?> Map<out K1, V1>.plus(pair: Pair<K1, V1>): Map<K1, V1> {
|
||||
return when {
|
||||
<this>.isEmpty() -> mapOf<K1, V1>(pair = pair)
|
||||
else -> LinkedHashMap<K1?, V1?>(p0 = <this>).apply<LinkedHashMap<K1?, V1?>>(block = local fun LinkedHashMap<K1?, V1?>.<anonymous>() {
|
||||
return <this>.put(p0 = pair.<get-first>(), p1 = pair.<get-second>()) /*~> Unit */
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
abstract class Base<T : Any?> {
|
||||
constructor(x: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T
|
||||
field = x
|
||||
get
|
||||
|
||||
abstract fun <Y : Any?> foo(y: Y): T
|
||||
abstract var bar: T
|
||||
abstract get
|
||||
abstract set
|
||||
|
||||
abstract var <Z : Any?> Z.exn: T
|
||||
abstract get
|
||||
abstract set
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
class Derived1<T : Any?> : Base<T> {
|
||||
constructor(x: T) /* primary */ {
|
||||
super/*Base*/<T>(x = x)
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun <Y : Any?> foo(y: Y): T {
|
||||
return <this>.<get-x>()
|
||||
}
|
||||
|
||||
override var bar: T
|
||||
field = x
|
||||
override get
|
||||
override set
|
||||
|
||||
override var <Z : Any?> Z.exn: T
|
||||
override get(): T {
|
||||
return <this>.<get-x>()
|
||||
}
|
||||
override set(value: T) {
|
||||
}
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
fun test1(): J1<Int?> {
|
||||
return J1<Int?>()
|
||||
}
|
||||
|
||||
fun test2(): J1<Int?> {
|
||||
return J1<Int?, Int?>(x1 = 1)
|
||||
}
|
||||
|
||||
fun test3(j1: J1<Any>): J2<Int?, Any> {
|
||||
return j1.J2<Int?>()
|
||||
}
|
||||
|
||||
fun test4(j1: J1<Any>): J2<Int?, Any> {
|
||||
return j1.J2<Int?, Int?>(x2 = 1)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
val test: @FlexibleNullability JEnum
|
||||
field = JEnum.ONE
|
||||
get
|
||||
@@ -0,0 +1,12 @@
|
||||
class Test1 : J {
|
||||
constructor() /* primary */ {
|
||||
super/*J*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val test: JInner
|
||||
field = <this>.JInner()
|
||||
get
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
val test: String?
|
||||
field = J().getFoo()
|
||||
get
|
||||
@@ -0,0 +1,4 @@
|
||||
val Class<*>.test: Array<out Field?>?
|
||||
get(): Array<out Field?>? {
|
||||
return <this>.getDeclaredFields()
|
||||
}
|
||||
Reference in New Issue
Block a user