Commit 2d599fde authored by pfdietz's avatar pfdietz

Test of the scope of free declarations in flet, labels

parent bb47dcce
......@@ -455,4 +455,26 @@
(signals-error
(flet ((%f (&key) :bad)) (%f nil nil))
program-error)
t)
\ No newline at end of file
t)
;;; Free declarations do not affect argument forms
(deftest flet.62
(let ((x :bad))
(declare (special x))
(let ((x :good))
(flet ((%f (&optional (y x))
(declare (special x))
y))
(%f))))
:good)
(deftest flet.63
(let ((x :bad))
(declare (special x))
(let ((x :good))
(flet ((%f (&key (y x))
(declare (special x))
y))
(%f))))
:good)
......@@ -298,4 +298,26 @@
(eqlt x (funcall x)))
t)
;;; Test that free declarations do not affect argument forms
(deftest labels.41
(let ((x :bad))
(declare (special x))
(let ((x :good))
(labels ((%f (&optional (y x))
(declare (special x))
y))
(%f))))
:good)
(deftest labels.42
(let ((x :bad))
(declare (special x))
(let ((x :good))
(labels ((%f (&key (y x))
(declare (special x))
y))
(%f))))
:good)
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