<< Back to previous view

[CLJ-869] Macro auto-gensym in let not visible after a nested unquote/syntax-quote Created: 03/Nov/11  Updated: 02/Dec/11  Resolved: 02/Dec/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.3
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Alexander Taggart Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None


 Description   

See the following simplified example:

user=> (defmacro foo [flag]
        `(let [a# 1]
          ~(if flag
             `(println a#))))
#'user/foo
user=> (foo false)
nil
user=> (foo true)
java.lang.Exception: Unable to resolve symbol: a__574__auto__ in this context (NO_SOURCE_FILE:6)
user=> (macroexpand-1 '(foo true))
(clojure.core/let [a__575__auto__ 1] (clojure.core/println a__574__auto__))


 Comments   
Comment by Rich Hickey [ 02/Dec/11 10:42 AM ]

This is not a bug

Generated at Sat Nov 29 01:42:35 CST 2014 using JIRA 4.4#649-r158309.