Skip to content

Instantly share code, notes, and snippets.

View anry200's full-sized avatar

Denys Honcharenko anry200

View GitHub Profile
@programming086
programming086 / inline_example.kt
Created July 27, 2017 15:28
Kotlin inline modifiers
class Store(val lambda: () -> Unit)
inline fun someFun(inlineLambda: () -> Unit,
noinline noinlineLambda: () -> Unit,
crossinline crossinlineLambda: () -> Unit) {
Store {
//inlineLambda cannot be used
noinlineLambda() //not inlined
crossinlineLambda() //not inlined
}