From d6ba8dd31733e6f3b455a8f746087b33066fef81 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 2 Aug 2017 20:10:32 -0700 Subject: Bugfix: (sys:expr . atom) bad syntax out of parser. * parser.y (expand_meta): Fix incorrect conversion of (sys:var x) when x is a non-bindable term to (sys:expr . x). Should be (sys:expr x). This doesn't have that much of an impact, I don't think. It prevent certain degenerate forms from working like @(bind x @"str"). The bad thing is that this particular one has a silent problem: @"str" wrongly evaluates to #\s. Neverheless, this doesn't seem worth the addition of a compat flag test; the odds of someone depending on @"str" producing #\s in some pattern language code see vanishingly low. --- parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.y b/parser.y index 0884e4aa..2746f9e9 100644 --- a/parser.y +++ b/parser.y @@ -1601,7 +1601,7 @@ val expand_meta(val form, val menv) if (sym == var_s) { val var_x = expand(second(form), menv); if (!bindable(var_x)) - return rlcp(cons(expr_s, var_x), form); + return rlcp(cons(expr_s, cons(var_x, nil)), form); return rlcp(cons(var_s, cons(var_x, nil)), form); } -- cgit v1.2.3