Switch statement works fine but not switch expressions. Compilation errors occur when using one. Can be mitigated by using switch statements insead.