Comment 6 for bug 573747

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

The fix is really trivial - just to add two lines to the evaluator code is enough.

SBCL behaviour after the fix:

* (declare (print "I am going to be evaluated by SBCL"))

debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING
                                               {A9EB801}>:
  Declarations are not allowed here: (DECLARE
                                      (PRINT
                                       "I am going to be evaluated by SBCL"))

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-INT:SIMPLE-EVAL-IN-LEXENV
 (DECLARE (PRINT "I am going to be evaluated by SBCL"))
 #<NULL-LEXENV>)
0]

Notice that the string is not printed - so, the evaluation does not occur even partially, and the error message is clear.

Regards,
Roman