Files
kotlin/compiler/testData/codegen/box/funInterface/basicFunInterface.kt
2020-01-17 19:37:48 +03:00

17 lines
244 B
Kotlin
Vendored

// !LANGUAGE: +FunctionalInterfaceConversion
// TARGET_BACKEND: JVM
fun interface Foo {
fun invoke(): String
}
class A : Foo {
override fun invoke(): String {
return "OK"
}
}
fun box(): String {
return A().invoke()
}