Comment 5 for bug 573747

Revision history for this message
Roman Marynchak (roman-marynchak) wrote :

You are right, I have entered that garbage in REPL intentionally, because I saw in compiler sources (src/code/eval.lisp) this code

(defun %simple-eval (expr lexenv)
  (let* (;; why PROGN? So that attempts to eval free declarations
         ;; signal errors rather than return NIL. -- CSR, 2007-05-01
         (lambda `(lambda ()
                    (declare (muffle-conditions compiler-note))
                    (progn ,expr)))
         (fun (sb!c:compile-in-lexenv nil lambda lexenv)))
    (funcall fun)))

This trick is not CLHS-compliant. Just because "In situations where such expressions can appear, explicit checks are made for their presence and they are never actually evaluated". There is no check, and the evaluation proceeds at least partially. The string from my example should never be printed, and the error about invalid declaration attempt should be signalled. So, I am inclined to call this a bug :)