What is the compact syntax for local variables tha...
# announcements
i
What is the compact syntax for local variables that can’t be null while also printing a message when they are? An example that works, without printing:
Copy code
fun myMethod(): String? {
    val foo = myOptional ?: return null
}