Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt.txt
T

45 lines
703 B
Plaintext
Vendored

package test
class Foo<T : Any?> {
constructor() /* primary */ {
super/*Any*/()
/* InstanceInitializerCall */
}
inner class Inner<P : Any?> {
constructor(a: T, b: P) /* primary */ {
super/*Any*/()
/* 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> = Foo<String>()
val foo: Inner<String, String> = foo<String, String>(a = "O", b = "K", x = ::<init>)
return foo.<get-a>().plus(other = foo.<get-b>())
}