Ensure an error is reported if switch expression does not correctly produce a value. Reviewed-by: mcimadamore