blob: b58c2daf3d138b549a8393830599b6264896dd66 [file] [log] [blame]
// 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()
}