Update the compiler state when updating the switch.