summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-29 06:35:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-29 06:35:44 -0700
commit37b9e093822a7cb4d813b5ea41d6097cce54de33 (patch)
tree0f63e58b1c4d8486769f8e46a5085b778105bad6
parentca6199a0a48cba367ebc81e6d463c4e0a170f9c5 (diff)
downloadtxr-37b9e093822a7cb4d813b5ea41d6097cce54de33.tar.gz
txr-37b9e093822a7cb4d813b5ea41d6097cce54de33.tar.bz2
txr-37b9e093822a7cb4d813b5ea41d6097cce54de33.zip
compiler: incorrect null destructuring pattern.
* share/txr/stdlib/compiler.tl (expand-bind-mac-params): The listp function identifies a recursive parameter, not consp, because nil is an empty pattern, and not a variable name, in macro-style parameter lists.
-rw-r--r--share/txr/stdlib/compiler.tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index d0d6615d..34c0134d 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -1135,7 +1135,7 @@
(:env ^((set ,sym ,menv-var))))))
,*(append-each ((p req-pars))
(cond
- ((consp p)
+ ((listp p)
^((set ,curs (car ,obj-var))
(set ,obj-var (cdr ,obj-var))
,*(expand-rec p curs)))
@@ -1146,7 +1146,7 @@
,*(append-each ((o opt-pars))
(tree-bind (p : init-form pres-p) o
(cond
- ((consp p)
+ ((listp p)
(when pres-p
(push pres-p vars))
^((set ,curs (or (car ,obj-var)