mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
13 lines
208 B
Kotlin
13 lines
208 B
Kotlin
package test
|
|
|
|
import kotlin.InlineOption.*
|
|
|
|
inline fun <R> doWork(inlineOptions(ONLY_LOCAL_RETURN) job: ()-> R) : R {
|
|
return notInline({job()})
|
|
}
|
|
|
|
fun <R> notInline(job: ()-> R) : R {
|
|
return job()
|
|
}
|
|
|