From 671aef66344ee64c925b9be37d17a524e9dbb2a0 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Fri, 6 Apr 2012 18:20:55 +0200 Subject: [PATCH] Warn when the OTHERWISE/T clause in CASE appears at a position other than the last one. --- src/c/compiler.d | 4 ++++ 1 file changed, 4 insertions(+) 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;