[IR] add testdata for dumpKotlinLike
This commit is contained in:
committed by
teamcityserver
parent
d2022ab115
commit
8d5facb15f
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
package test
|
||||
|
||||
class Foo<T : Any?> {
|
||||
constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
inner class Inner<P : Any?> {
|
||||
constructor(a: T, b: P) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
val a: T
|
||||
field = a
|
||||
get
|
||||
|
||||
val b: P
|
||||
field = b
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
inline fun <A : Any?, B : Any?> foo(a: A, b: B, x: Function2<A, B, Inner<B, A>>): Inner<B, A> {
|
||||
return x.invoke(p1 = a, p2 = b)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val z: Foo<String> = TODO("IrConstructorCall")
|
||||
val foo: Inner<String, String> = foo<String, String>(a = "O", b = "K", x = ::<init>)
|
||||
return foo.<get-a>().plus(other = foo.<get-b>())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user