Commit cb5fdbce authored by pfdietz's avatar pfdietz
Browse files

Add tests for special declarations of macrolet arguments

parent 69a987f4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ Got: 0
    the parent type(s).  (This came up in ABCL.)

44. Add tests for SPECIAL declarations in MACROLET (requested by piso on #lisp)
  (partially done)

45. Test (WARN (FORMATTER ...)) (and check that FORMATTER functions work with
  other error signaling functions.)
+35 −0
Original line number Diff line number Diff line
@@ -380,3 +380,38 @@
    (declare (optimize))
    (%x))
  t)

(deftest macrolet.43
  (let ((*x* nil))
    (declare (special *x*))
    (let ((*f* #'(lambda () *x*)))
      (declare (special *f*))
      (eval `(macrolet ((%m (*x*)
			    (declare (special *f*))
			    (funcall *f*)))
	       (%m t)))))
  nil)

(deftest macrolet.44
  (let ((*x* nil))
    (declare (special *x*))
    (let ((*f* #'(lambda () *x*)))
      (declare (special *f*))
      (eval `(macrolet ((%m (*x*)
			    (declare (special *f* *x*))
			    (funcall *f*)))
	       (%m t)))))
  t)

(deftest macrolet.45
  (let ((*x* nil))
    (declare (special *x*))
    (let ((*f* #'(lambda () *x*)))
      (declare (special *f*))
      (eval `(macrolet ((%m ((*x*))
			    (declare (special *f* *x*))
			    (funcall *f*)))
	       (%m (t))))))
  t)

;;; TODO: more special declarations for other macrolet arguments