Files
kotlin/compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt
2019-06-04 14:56:13 +02:00

19 lines
324 B
Kotlin
Vendored

// FILE: 1.kt
package test
class Foo<T> {
inner class Inner<P>(val a: T, val b: P)
}
inline fun <A, B> foo(a: A, b: B, x: (A, B) -> Foo<A>.Inner<B>): Foo<A>.Inner<B> = x(a, b)
// FILE: 2.kt
import test.*
fun box(): String {
val z = Foo<String>()
val foo = foo("O", "K", z::Inner)
return foo.a + foo.b
}