Subject: Wrong test?
Date: Monday 26th December 2011 15:26:51 UTC (over 6 years ago)
(MACROLET ((%M (Z) Z)) (CTYPECASE (EXPAND-IN-CURRENT-ENV (%M :FOO)) (INTEGER :BAD1) (KEYWORD :GOOD) (SYMBOL :BAD2))) What is this supposed to check? In ECL this leads to the following code (CTYPECASE :FOO (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. Juanjo -- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com