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
commitb16161cfde6d76bf1d13e987ab823ed0aa462787 (patch)
tree0f63e58b1c4d8486769f8e46a5085b778105bad6
parent9bc26107536f4936e20570e4740050f2dbf70800 (diff)
downloadtxr-b16161cfde6d76bf1d13e987ab823ed0aa462787.tar.gz
txr-b16161cfde6d76bf1d13e987ab823ed0aa462787.tar.bz2
txr-b16161cfde6d76bf1d13e987ab823ed0aa462787.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)