What does it mean if there is a lambda with a null...
# getting-started
a
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
I see you found your answer already, but yes,
this
can be null in Kotlin, https://pl.kotl.in/H169XXRp7 for very simple example