Files
kotlin/compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt
Mark Punzalan 5afab1ac2b [FIR] FIR2IR: Populate calls with type arguments and function type
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00

10 lines
178 B
Kotlin
Vendored

class TestClass {
inline operator fun <T> invoke(task: () -> T) = task()
}
fun box(): String {
val test = TestClass()
val ok = "OK"
val x = test { return ok }
}