Shawn
10/09/2017, 3:24 PMwhen (i) {
in 0..10 -> println("matched")
else -> println("not matched")
}
println("finished")nil2l
10/09/2017, 3:26 PMShawn
10/09/2017, 3:27 PMi is in 0..10, it will print matched, and then exit the when block. If i is not in that range, you’ll hit the else case instead. They will never both be executednil2l
10/09/2017, 3:29 PM