summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorPaul A. Patience <paul@apatience.com>2022-01-10 01:52:42 -0500
committerKaz Kylheku <kaz@kylheku.com>2022-01-12 07:27:11 -0800
commit740ece8a507d3a61b048b7bf8aa4dd3e94cdb665 (patch)
treecc63ce75a6a1caa58250fb8c19bc8e728263092a /stdlib
parentdf49a0adefd929a6a77cf81c0adcdbd7157fcbb7 (diff)
downloadtxr-740ece8a507d3a61b048b7bf8aa4dd3e94cdb665.tar.gz
txr-740ece8a507d3a61b048b7bf8aa4dd3e94cdb665.tar.bz2
txr-740ece8a507d3a61b048b7bf8aa4dd3e94cdb665.zip
typecase: return nil from formless clauses.
* stdlib/type.tl (typecase): Return nil (as documented) instead of t when a matching clause has no clause forms.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/type.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/type.tl b/stdlib/type.tl
index 096e7b76..f75c88e2 100644
--- a/stdlib/type.tl
+++ b/stdlib/type.tl
@@ -30,7 +30,7 @@
(tree-case cl
((type . body)
(if (symbolp type)
- ^((typep ,val ',type) ,*body)
+ ^((typep ,val ',type) ,*(or body '(nil)))
:))
(else (throwf 'eval-error
"~s: bad clause syntax: ~s"