diff --git a/src/c/compiler.d b/src/c/compiler.d index fe8926fd6..1f78b2e06 100644 --- a/src/c/compiler.d +++ b/src/c/compiler.d @@ -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;