I found a bug in Clojure core, and know its solution, question is how
to submit a bug report?
FYI here is the bug:
=> (.withMeta list {:a 1})
#<CompilerException java.lang.UnsupportedOperationException
(NO_SOURCE_FILE:0)>
This is reporducable in Clojure 1.2 and Clojure 1.3
This cause of this issue is in:
svn/trunk/src/jvm/clojure/lang/PersistentList.java
with the static method:
public static IFn creator = new RestFn(0){
protected Object doInvoke(Object args) throws Exception{
if(args instanceof ArraySeq)
{
Object[] argsarray = (Object[]) ((ArraySeq)
args).array;
IPersistentList ret = EMPTY;
for(int i = argsarray.length - 1; i >= 0; --i)
ret = (IPersistentList)
ret.cons(argsarray[i]);
return ret;
}
LinkedList list = new LinkedList();
for(ISeq s = RT.seq(args); s != null; s = s.rest())
list.add(s.first());
return create(list);
}
};
The withMeta() method should be overriden from AFn where it is
throwing the UnsupportedOperationException. This is being done with
the EmptyList static class further down the file.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en