<< Back to previous view

[CLJ-1017] Metadata expressions are evaluated after the expression they affect Created: 23/Jun/12  Updated: 23/Jun/12

Status: Open
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Trivial
Reporter: Brandon Bloom Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Repro:

user=> (def x (atom 1))
#'user/x
user=> ^{:foo (swap! x inc)} {:bar (swap! x inc)}
{:bar 2}
user=> (meta *1)
{:foo 3}

Presumably this is because ^:foo x expands to (with-meta x {:foo true}) but probably should have reversed argument order or use a let expression.


Generated at Thu Jul 31 08:49:55 CDT 2014 using JIRA 4.4#649-r158309.