https://kotlinlang.org logo
Title
a

aarjav

11/17/2018, 11:10 PM
What does it mean if there is a lambda with a nullable receiver?
this
can == null in the body of the lambda?
fun foo(block: String?.() -> Unit)
vs
fun foo(block: String.() -> Unit)
I noticed that with the second I cannot call
.block()
on a
String?
but the lambda body (for block param where foo is used) stays the same.
nvm it did change, IJ just had not picked up the change until i rebuilt 🤦
r

rnpy

11/17/2018, 11:27 PM
I see you found your answer already, but yes,
this
can be null in Kotlin, https://pl.kotl.in/H169XXRp7 for very simple example