Juan Jose Garcia-Ripoll | 26 Dec 16:26 2011

Wrong test?

          (INTEGER :BAD1)
          (KEYWORD :GOOD)
          (SYMBOL :BAD2)))

What is this supposed to check? In ECL this leads to the following code

          (INTEGER :BAD1)
          (KEYWORD :GOOD)
          (SYMBOL :BAD2)))

This is in my opinion wrong.. CTYPECASE is supposed to contain a form for a correctable error, including a replacement of the value of the form, in this case :FOO. This means CTYPECASE expands at some point to (SETF :FOO ...) which is not a valid code, given that :FOO is a constant.

I know that SBCL and probably other implementations do not complain about this until the assignment is performed, but this does not mean that the code is valid.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
ansi-test-devel mailing list
ansi-test-devel <at> common-lisp.net