Skip to content

Instantly share code, notes, and snippets.

@arifvn
Last active November 15, 2020 20:32
Show Gist options
  • Save arifvn/7ea5c57862e738234eb86fb1a80405b2 to your computer and use it in GitHub Desktop.
Save arifvn/7ea5c57862e738234eb86fb1a80405b2 to your computer and use it in GitHub Desktop.
// declaration
inline fun inlineFunction(callback: () -> User) {
println("before callback")
val result = callback()
println("after callback")
}
// Illegal usage of inline-parameter 'callback' in '...'.
// Add 'noinline' modifier to the parameter declaration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment