Allow enums in switch statement optimization.