how can i force a `when` to continue to the next c...
# announcements
s
how can i force a
when
to continue to the next case even if the current case is valid for example
Copy code
val x = true
val y = 1
when(x) {
    true -> when(y) {
        1 -> // go to else of when(x) and not else of when(y), since false of when(x) will not match true
        else -> println("pass")
    }
    false -> println("statement")
    else -> println("fail")
}
a
like the next ‘case’ ?
r
Have you read the docs? While a few of the many questions you've asked in the last few days have been good, many (like this one) have been fundamental questions that make it seem like you haven't bothered to look anything up.
🙏 1
☝️ 5
Or just through your question on Google/Bing/DuckDuckGo/whatever. It has been answered many times.
s
tried, could not find anything relating to my question
👎 3
r
👌 1