summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-15 21:36:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-15 21:36:51 -0700
commit969dff328ab43e3a96248fc9cce41584819b9114 (patch)
tree58e21da914d19bf1abe5f9ec75a63acc3fd3a9b2 /lib.h
parent6a5ea25622c3dbab61b35bab87506c83206ec5fd (diff)
downloadtxr-969dff328ab43e3a96248fc9cce41584819b9114.tar.gz
txr-969dff328ab43e3a96248fc9cce41584819b9114.tar.bz2
txr-969dff328ab43e3a96248fc9cce41584819b9114.zip
Bugfix: unable to assign to x.y.z place.
This regression was caused by commit 957f80f "Bugfix: issue with expansion of place macros" on Sep 7, 2016. The commit itself is sound, but exposes a hidden problem in nearby code. * share/txr/stdlib/place.tl (sys:pl-expand): The conditions for terminating the loop and returning the expansion are too weak, due to the inclusion of an incorrect test. We must not bail when the expansion of a compound form is a compound form with the same symbol. This is because some macros behave that way, such as, oh: qref! The expansion of (qref a b c) is (qref (slot a 'b) 'c): another qref form. To fully expand, we must keep iterating until the returned form is eq to the input form. The original macroexpand (which was replaced by macroexpand-1 in 957f80f) hid this problem because macroexpand doesn't use this broken termination test.
Diffstat (limited to 'lib.h')
0 files changed, 0 insertions, 0 deletions