mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
17 lines
294 B
Kotlin
17 lines
294 B
Kotlin
import kotlin.InlineOption.*
|
|
|
|
class A {
|
|
fun foo() {
|
|
inlineFun { "test" }
|
|
}
|
|
|
|
inline fun inlineFun(inlineOptions(ONLY_LOCAL_RETURN) lambda: () -> Unit) {
|
|
val s = object {
|
|
fun run() {
|
|
lambda()
|
|
}
|
|
}
|
|
s.run()
|
|
}
|
|
}
|