Completed
Details
Assignee
UnassignedUnassignedReporter
importimportLabels
Approval
OkPatch
CodePriority
CriticalAffects versions
Fix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
import
importLabels
Approval
Ok
Patch
Code
Priority
Affects versions
Fix versions
Created January 22, 2015 at 9:43 PM
Updated May 12, 2015 at 3:45 PM
Resolved May 12, 2015 at 3:45 PM
In Compiler.java, resolveSymbol() uses == to compare a Symbol's ns and the found namespace's name. This can result in a false comparison result, though the name's may be equal. In the following example:
ond.core=> (require '[clojure.string])
nil
ond.core=> `(clojure.string/join "," [1 2])
false : true ;; reported from System.out.println code I put into Compiler.java for == vs .equals()
nil
The result is that a new Symbol is allocated, when the previous one should be returned.
Prior to Clojure 1.7, Symbol name and ns were interned so == would actually have worked, but that is no longer the case.
Patch: resolve-symbol-equals.diff
Screened by: Alex Miller
[1] - https://groups.google.com/forum/#!topic/clojure-dev/58fYUSIEfxg