X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fwalk.impure.lisp;h=693000baf83140fab52958884d9560ca46555328;hb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;hp=8642df777c0076f45f43f9aeb5400d33a88002ad;hpb=89eb73c035f05ae53b1148ef8a83e1d4030b2dd8;p=sbcl.git diff --git a/tests/walk.impure.lisp b/tests/walk.impure.lisp index 8642df7..693000b 100644 --- a/tests/walk.impure.lisp +++ b/tests/walk.impure.lisp @@ -34,21 +34,21 @@ (defun take-it-out-for-a-test-walk-1 (form) (let ((copy-of-form (copy-tree form)) (result (walk-form form nil - #'(lambda (x y env) - (format t "~&Form: ~S ~3T Context: ~A" x y) - (when (symbolp x) - (let ((lexical (var-lexical-p x env)) - (special (var-special-p x env))) - (when lexical - (format t ";~3T") - (format t "lexically bound")) - (when special - (format t ";~3T") - (format t "declared special")) - (when (boundp x) - (format t ";~3T") - (format t "bound: ~S " (eval x))))) - x)))) + (lambda (x y env) + (format t "~&Form: ~S ~3T Context: ~A" x y) + (when (symbolp x) + (let ((lexical (var-lexical-p x env)) + (special (var-special-p x env))) + (when lexical + (format t ";~3T") + (format t "lexically bound")) + (when special + (format t ";~3T") + (format t "declared special")) + (when (boundp x) + (format t ";~3T") + (format t "bound: ~S " (eval x))))) + x)))) (cond ((not (equal result copy-of-form)) (format t "~%Warning: Result not EQUAL to copy of start.")) ((not (eq result form)) @@ -935,14 +935,14 @@ Form: NIL Context: EVAL; bound: NIL (with-output-to-string (*standard-output*) (let ((the-lexical-variables ())) (walk-form '(let ((a 1) (b 2)) - #'(lambda (x) (list a b x y))) + (lambda (x) (list a b x y))) () - #'(lambda (form context env) - (declare (ignore context)) - (when (and (symbolp form) - (var-lexical-p form env)) - (push form the-lexical-variables)) - form)) + (lambda (form context env) + (declare (ignore context)) + (when (and (symbolp form) + (var-lexical-p form env)) + (push form the-lexical-variables)) + form)) (or (and (= (length the-lexical-variables) 3) (member 'a the-lexical-variables) (member 'b the-lexical-variables) @@ -950,4 +950,8 @@ Form: NIL Context: EVAL; bound: NIL (error "Walker didn't do lexical variables of a closure properly.")))) "")) +;; old PCL hung up on it +(defmethod #:foo () + (defun #:bar ())) + (quit :unix-status 104)