diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-29 06:35:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-29 06:35:44 -0700 |
commit | 37b9e093822a7cb4d813b5ea41d6097cce54de33 (patch) | |
tree | 0f63e58b1c4d8486769f8e46a5085b778105bad6 /share | |
parent | ca6199a0a48cba367ebc81e6d463c4e0a170f9c5 (diff) | |
download | txr-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.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/compiler.tl | 4 |
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) |