[parenscript-devel] Operator precedence bug
![](https://secure.gravatar.com/avatar/f280fbf7764035c257f907cf2223eac0.jpg?s=120&d=mm&r=g)
(let ((str "a") (n 1)) (+ str (+ n 1))) should produce "a2", but instead compiles to "str + n + 1" and produces "a11".
![](https://secure.gravatar.com/avatar/6a2a0564e2c584c8e9fa1ec369bd23e0.jpg?s=120&d=mm&r=g)
Just pushed a patch for this. I know I saw a similar example with string concatenation somewhere in a book or on the web before, but it didn't occur to me until now that this means that '+' is not associative in JavaScript. Thanks for the bug report! On Tue, Jan 31, 2012 at 3:31 PM, Daniel Gackle <danielgackle@gmail.com> wrote:
(let ((str "a") (n 1)) (+ str (+ n 1)))
should produce "a2", but instead compiles to "str + n + 1" and produces "a11".
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
participants (2)
-
Daniel Gackle
-
Vladimir Sedach