Give:
enum Foo { a, b, c, d, e }
Foo f = Foo.c;
Are the below statements equivalent?
switch(f) {
case Foo.a:
case Foo.b:
doSomething();
break;
// ...
}
and:
(note the comma in the case)
switch(f) {
case Foo.a, Foo.b: doSomething(); break;
// ...
}
I found it in some source code, tested and it does work but is
this the standard behavior?