[CLJ-438] case* and code walkers Created: 23/Sep/10 Updated: 13/Apr/12 Resolved: 13/Apr/12 |
|
| Status: | Closed |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Backlog |
| Type: | Defect | Priority: | Blocker |
| Reporter: | Assembla Importer | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Approval: | Vetted |
| Description |
|
Clojure 1.2.0-master-SNAPSHOT user=> (macroexpand-all '(case 1 1 :test)) false)) The existing code walkers convert the embedded [1 :test] into a PersistentVector that the compiler doesn't accept. |
| Comments |
| Comment by Assembla Importer [ 01/Oct/10 10:47 AM ] |
|
Converted from http://www.assembla.com/spaces/clojure/tickets/438 |
| Comment by Colin Jones [ 01/Jan/11 4:13 PM ] |
|
A post-order traversal for macroexpand-all seems more reliable here than pre-order, and does fix the issue. The attached patch adds tests around this and updates macroexpand-all to use postwalk rather than prewalk. |
| Comment by Alexander Taggart [ 28/Feb/11 1:51 PM ] |
|
This has been fixed in the patch on The CaseExpr parser now just treats the map value as a tuple by calling RT.first/second, rather than casting it to a MapEntry. |
| Comment by Colin Jones [ 10/Oct/11 9:28 AM ] |
|
Confirming Alex's fix - this ticket can just get closed, I think. |