Commit cb5fdbce authored by pfdietz's avatar pfdietz

Add tests for special declarations of macrolet arguments

parent 69a987f4
......@@ -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.)
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment