class Foo { void foo(Constants c) { switch (c) { case B } } } enum Constants { BAR0, BAR1; }