Compiler gives incorrect error if T clause in case construct is not last one
Hi,
This is a debian bug 665896 and applies to 20c:
$ cmucl
CMU Common Lisp Debian build (20F Unicode), running on frost
With core: /usr/lib/cmucl/lisp-sse2.core
Dumped on: Thu, 2015-06-04 10:35:42+02:00 on rootfs
See <http://www.cmucl.org/> for support information.
Loaded subsystems:
Unicode 1.29 with Unicode version 6.2.0
Python 1.1, target Intel x86/sse2
CLOS based on Gerd's PCL 2010/03/19 15:19:03
* (defparameter x 2)
X
* (defun foo (y) (case y (t (print "matches t")) (1 (print "matches 1"))))
FOO
* (foo x)
; In: LAMBDA (Y)
; (CASE Y (T #) (1 #))
; Error: (during macroexpansion)
;
; Error in function LISP::CASE-BODY:
; T and OTHERWISE may not be used as key designators for CASE
;
; #'(LAMBDA (Y) (BLOCK FOO #))
; Note: Variable Y defined but never used.
Execution of a form compiled with errors:
(CASE Y (T (PRINT "matches t")) (1 (PRINT "matches 1")))
[Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(FOO #<unused-arg>)
Source: (BLOCK FOO (CASE Y (T #) (1 #)))
0]
This problem was handled by sbcl as 959687.