Commit 833ff8c6 authored by pfdietz's avatar pfdietz
Browse files

Added tests of special variable bindings for flet parameters.

parent e0db2a52
......@@ -293,3 +293,64 @@
(1 2 (:foo a :bar b) a b)
(1 2 (:bar b :foo a) a b))
;;; Binding of formal parameters that are also special variables
(deftest flet.35
(let ((x 'bad))
(declare (special x))
(flet ((%f () x))
(flet ((%g (x)
(declare (special x))
(%f)))
(%g 'good))))
good)
(deftest flet.36
(let ((x 'bad))
(declare (special x))
(flet ((%f () x))
(flet ((%g (&aux (x 'good))
(declare (special x))
(%f)))
(%g))))
good)
(deftest flet.37
(let ((x 'bad))
(declare (special x))
(flet ((%f () x))
(flet ((%g (&rest x)
(declare (special x))
(%f)))
(%g 'good))))
(good))
(deftest flet.38
(let ((x 'bad))
(declare (special x))
(flet ((%f () x))
(flet ((%g (&key (x 'good))
(declare (special x))
(%f)))
(%g))))
good)
(deftest flet.39
(let ((x 'bad))
(declare (special x))
(flet ((%f () x))
(flet ((%g (&key (x 'bad))
(declare (special x))
(%f)))
(%g :x 'good))))
good)
(deftest flet.40
(let ((x 'good))
(declare (special x))
(flet ((%f () x))
(flet ((%g (&key (x 'bad))
(%f)))
(%g :x 'worse))))
good)
Supports Markdown
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