Warn when the OTHERWISE/T clause in CASE appears at a position other than the last one.

This commit is contained in:
Juan Jose Garcia Ripoll 2012-04-06 18:20:55 +02:00
parent 3980ea5d66
commit 671aef6634

View file

@ -1019,6 +1019,10 @@ perform_c_case(cl_env_ptr env, cl_object args, int flags) {
} while (test == Cnil);
if (@'otherwise' == test || test == Ct) {
unlikely_if (args != Cnil) {
FEprogram_error_noreturn("CASE: The selector ~A can only appear at the last position.",
1, test);
}
compile_body(env, clause, flags);
} else {
cl_index labeln, labelz;