Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt
T
2021-02-02 17:53:52 +03:00

22 lines
334 B
Kotlin
Vendored

// FILE: 1.kt
package test
interface Foo {
fun call(): String
}
inline fun f(crossinline g: () -> String) = object: Foo {
fun <T> foo() = g()
fun <T> bar() = "K"
override fun call(): String = foo<String>() + bar<String>()
}
// FILE: 2.kt
import test.*
val x = f { "O" }
fun box() : String {
return x.call()
}