Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt
T
2019-10-29 09:48:49 +01:00

21 lines
333 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()
}