diff --git a/src/expand.clj b/src/expand.clj index 84d7e4b..4ebafb0 100644 --- a/src/expand.clj +++ b/src/expand.clj @@ -524,7 +524,7 @@ (into % (map-indexed (fn [n a] - [a (symbol (str "s" (+ (dec (count r)) n)))]) + [a (symbol (str "s" (+ (count %) n)))]) r))))] #_(->Variable sym (set (map #(get syms %) scopes))) [sym (set (map #(get syms %) scopes))]) diff --git a/test/expand_test.clj b/test/expand_test.clj index bc54ca1..309f577 100644 --- a/test/expand_test.clj +++ b/test/expand_test.clj @@ -85,7 +85,7 @@ (t/is (= '(let (([x #{s0}] 123)) (let-syntax ((m (syntax-rules () ((m) x)))) (lambda ([x #{s1 s2 s0}]) - [x #{s0}]))) + [x #{s0 s3}]))) (sut/rg-expand '(let ((x 123)) (let-syntax ((m (syntax-rules ()