class A extends Base{ void foo(){ B x = null; switch(x){ GOO } } } enum B{ FOO, BAR, GOO }