Hi. in some cases, one branch and “else” branch do the same work in “when” expression. for example:
when (x) { 1 -> doJobOne() 2 -> doJobTwo() else -> { doJobOne() } }
I tried to do the below code but I faced an error:
when (x) { 2 -> doJobTwo() 1, else -> { doJobOne() } }