Commit 31c4cfc4 authored by pfdietz's avatar pfdietz

Tests that the function values returned by #'<name> on a LABELS-bound name respect EQL

parent a480887a
......@@ -271,4 +271,31 @@
(signals-error
(labels ((%f (&key) :bad)) (%f nil nil))
program-error)
t)
\ No newline at end of file
t)
;;; Identity of function objects
;;; Since (FUNCTION <name>) returns *the* functional value, it
;;; should be the case that different invocations of this form
;;; in the same lexical environment return the same value.
(deftest labels.37
(labels ((f () 'foo))
(eqt #'f #'f))
t)
(deftest labels.38
(labels ((f () 'foo))
(destructuring-bind (x y) (loop repeat 2 collect #'f) (eqlt x y)))
t)
(deftest labels.39
(labels ((f () #'f))
(eqlt (f) #'f))
t)
(deftest labels.40
(let ((x (labels ((f () #'f)) #'f)))
(eqlt x (funcall x)))
t)
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