Commit 60f810ac authored by pfdietz's avatar pfdietz

Fixed busted FTYPE declarations and added tests for keywords as function names.

parent 75fd9968
......@@ -152,7 +152,7 @@
(declare (type fixnum x))
"Add one to the fixnum x."
(1+ x)))
(declare (ftype (fixnum) integer))
(declare (ftype (function (fixnum) integer) %f))
(%f 10))
11)
......@@ -390,3 +390,12 @@
(flet ((t () 'b)) (t))
b)
;;; Keywords can be function names
(deftest flet.47
(flet ((:foo () 'bar)) (:foo))
bar)
(deftest flet.48
(flet ((:foo () 'bar)) (funcall #':foo))
bar)
......@@ -160,6 +160,19 @@
(declare (type fixnum x))
"Add one to the fixnum x."
(1+ x)))
(declare (ftype (fixnum) integer))
(declare (ftype (function (fixnum) integer) %f))
(%f 10))
11)
;;; Keywords can be function names
(deftest labels.22
(labels ((:foo () 10)
(:bar () (1+ (:foo))))
(:bar))
11)
(deftest labels.23
(labels ((:foo () 10)
(:bar () (1+ (funcall #':foo))))
(funcall #':bar))
11)
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