Evaling #{do ...} or [do ...] is treated as the do special form

Description

Problem: Evaluating a persistent collection for which the function first returns the symbol do leads to that collection being treated as the do special form, even though it may be a vector or even a set. IMHO, the expected result would be to report that do cannot be resolved.

Cause: The check for do is checking for IPersistentCollection instead of ISeq.

Solution: Change the cast (occurs in two places) for the do form check from IPersistentCollection to ISeq:

to

Current patch: CLJ-1184-p4.patch

Screened by: Alex Miller

Environment

None

Attachments

4

Activity

Show:

Alex Miller August 17, 2013 at 1:50 PM

Screened.

gfredericks August 15, 2013 at 3:23 AM

Attached a new patch (p4) that should apply. Also halfway reverted a change that Alex made regarding which files are cleaned up after the test. When I run the tests on my machine with his version, several class files are leftover.

Andy Fingerhut August 15, 2013 at 1:55 AM

All 3 of the attached patches no longer apply cleanly to latest master as of Aug 14 2013. This may simply be due to extra tests added to file compilation.clj by the patch for CLJ-1154, which was committed earlier today. If so, it should be pretty straightforward to update the stale patch(es). See the section "Updating Stale Patches" at http://dev.clojure.org/display/community/Developing+Patches

Alex Miller July 24, 2013 at 4:55 AM

Updated description to help it along a bit and marked Screened.

Alex Miller July 24, 2013 at 4:49 AM

Updated patch very slightly to fix a spelling typo.

Completed

Details

Assignee

Reporter

Labels

Approval

Ok

Patch

Code and Test

Priority

Affects versions

Fix versions

Created March 16, 2013 at 2:56 PM
Updated October 25, 2013 at 5:01 PM
Resolved October 25, 2013 at 5:01 PM