hastebrot
07/12/2016, 10:40 PMif (bar == null)
and without non-local jumps:
fun main(args: Array<String>) {
for (foo in listOf(1, null, 2, 3, null)) {
val bar: String? = foo?.toString()
if (bar == null) {
println("warning")
continue
}
// do something with the non-null value.
println(bar)
}
}