We're updating the issue view to help you get more done. 

StackOverflow in clojure.test macroexpand with `are` and anonymous `fn`

Description

I noticed that this happens when an argument in anonymous `fn` is named the same as one of the binding in `are` form

1 2 3 4 5 6 (use 'clojure.test) (deftest x (are [x y] (= x y) ((fn [x] (inc x)) 1) 2)) => clojure.lang.Compiler$CompilerException: java.lang.StackOverflowError, compiling:(/Users/nprokopov/Dropbox/ws/clojure.unicode/test/clojure/test_unicode.clj:54:3)

Approach: Replace prewalk-replace with postwalk-replace. prewalk-replace first replaces the form and then goes inside it looking for more replacements. postwalk-replace avoids that.

Patch: clj-1588-2.patch

Screened by: Alex Miller

Environment

None

Status

Assignee

Unassigned

Reporter

Nikita Prokopov

Labels

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.6

Priority

Major