diff options
-rw-r--r-- | share/txr/stdlib/struct.tl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl index 2eecfbc7..ca3de714 100644 --- a/share/txr/stdlib/struct.tl +++ b/share/txr/stdlib/struct.tl @@ -211,7 +211,9 @@ (throwf 'eval-error "~s: bad syntax" 'qref)) (tree-case obj ((a b) (if (eq a 't) - ^(if ,b (qref ,b ,*refs)) + (let ((s (gensym))) + ^(slet ((,s ,b)) + (if ,s (qref ,s ,*refs)))) :)) (x (tree-case refs (() ()) |