What is the Scala\'s way to write the following code:
int i; switch(i) { case 1: a(); break; case 2: case 15: b();
According to this conversation there is no fallthrough, but you can make use of |.
|
This should do the trick:
i match { case 1 => a case 2 | 15 => b c case _ => foo }