mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
10 lines
178 B
Kotlin
Vendored
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 }
|
|
} |