Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
[fix] result-type FUNCTION need not signal TYPE-ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
digikar99 committed Sep 5, 2021
1 parent 681d01c commit 1885b96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
(def-stub to-long-float long-float))

(def-test to-function ()
;; http://clhs.lisp.se/Body/f_coerce.htm
(is (eq (fdefinition 'coerce) (coerce 'coerce 'function)))
(is (functionp (coerce '(lambda ()) 'function)))
(signals type-error (coerce '(progn (lambda ())) 'function)))
(signals error (coerce '(progn (lambda ())) 'function)))

(def-test to-string ()
(is (string= "A" (coerce 'a 'string)))
Expand Down

0 comments on commit 1885b96

Please sign in to comment.