Completed
Details
Details
Assignee
Unassigned
UnassignedReporter
Jirka Maršík
Jirka MaršíkLabels
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
Problem: Evaluating a persistent collection for which the function
first
returns the symboldo
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 thatdo
cannot be resolved.[do 1 2] ;=> 2 #{"hello" "goodbye" do} ;=> "hello" ; Wat?
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:if(form instanceof IPersistentCollection && Util.equals(RT.first(form), DO))
to
if(form instanceof ISeq && Util.equals(RT.first(form), DO))
Current patch: CLJ-1184-p4.patch
Screened by: Alex Miller