|
From: | Matt Wette |
Subject: | bug#19417: let, assq-set optimization gone wrong? |
Date: | Fri, 19 Dec 2014 21:51:29 -0800 |
This was discovered with help from address@hidden. It seems the variable "l" in the second let below is bound to the value from the first. I ran into this bug when using syntax-rules with a let/a-list in the expansion. mwette$ cat bug.scm (let ((l '((a . 1) (b . 2)))) (assq-set! l 'b 99)) (let ((l '((a . 1) (b . 2)))) l) mwette$ guile20 GNU Guile 2.0.11 Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (load "bug.scm") $1 = ((a . 1) (b . 99)) scheme@(guile-user)> %guile-build-info $2 = ((buildstamp . "2014-10-07 02:36:10") (CFLAGS . " -I/opt/local/include -D_THREAD_SAFE ") (LIBS . "-L/opt/local/lib -lm ") (libguileinterface . "29:2:7") (guileversion . "2.0.11") (extensiondir . "/opt/local/lib/guile/2.0/extensions") (pkgincludedir . "/opt/local/include/guile") (pkglibdir . "/opt/local/lib/guile") (pkgdatadir . "/opt/local/share/guile") (includedir . "/opt/local/include") (mandir . "/opt/local/share/man") (infodir . "/opt/local/share/info") (ccachedir . "/opt/local/lib/guile/2.0/ccache") (libdir . "/opt/local/lib") (localstatedir . "/opt/local/var") (sharedstatedir . "/opt/local/com") (sysconfdir . "/opt/local/etc") (datadir . "/opt/local/share") (libexecdir . "/opt/local/libexec") (sbindir . "/opt/local/sbin") (bindir . "/opt/local/bin") (exec_prefix . "/opt/local") (prefix . "/opt/local") (top_srcdir . "/opt/local/var/macports/build/_Users_mwette_proj_macports_ports_lang_guile20/guile20/work/guile-2.0.11") (srcdir . "/opt/local/var/macports/build/_Users_mwette_proj_macports_ports_lang_guile20/guile20/work/guile-2.0.11/libguile")) |
[Prev in Thread] | Current Thread | [Next in Thread] |