Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use invoke when calling an optional lambda #41

Closed
angelolloqui opened this issue Nov 6, 2017 · 1 comment
Closed

Use invoke when calling an optional lambda #41

angelolloqui opened this issue Nov 6, 2017 · 1 comment
Labels

Comments

@angelolloqui
Copy link
Owner

In Swift, this is possible:

let optionalLambda: (() -> Void)? = nil
...
optionalLambda?()

But in Kotlin, it should be:

val optionalLambda: (() -> Unit)? = null 
...
optionalLambda?.invoke()
angelolloqui pushed a commit that referenced this issue Feb 3, 2018
@angelolloqui
Copy link
Owner Author

Fixed with 6e6015c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant