[CLJS-360] Analyzer incorrectly merges metadata when redefining vars Created: 26/Aug/12 Updated: 31/Aug/12 Resolved: 31/Aug/12
I'm experimenting with using the analyzer for some more sophisticated macros, including a CPS transform and control constructs. During interactive development, I discovered that the analyzer is incorrectly merging metadata on vars when redefining them. This patch changes redef's to replace, rather than merge, existing var metadata.
The patch does not include a test, since the tests don't currently muck with the analyzer directly. Here's some code you can play with in your repl:
|Comment by Brandon Bloom [ 26/Aug/12 6:27 PM ]|
Also, the patch makes the behavior match JVM Clojure:
user=> (def ^:foo x)
|Comment by David Nolen [ 31/Aug/12 9:29 AM ]|
Can we get a patch without whitespace changes? Thanks!
|Comment by Brandon Bloom [ 31/Aug/12 11:22 AM ]|
Updated patch: no longer changes indent/whitespace and resolves conflict with change that happened to master since original patch.
|Comment by David Nolen [ 31/Aug/12 11:29 AM ]|