Why does this code work ``` fun String?.whenNotNul...
# getting-started
v
Why does this code work
Copy code
fun String?.whenNotNullOrEmpty(callback: (String) -> String?): String? {
    return if (this.isNullOrEmpty()) null
    else callback(this)
}
but this doesn’t ?
Copy code
fun String?.whenNotNullOrEmpty(callback: (String) -> String?): String? {
    return if (isNullOrEmpty()) null
    else callback(this)
}
s
Seems like a bug
You should report it
d