On Dec 21, 2008, at 4:35 PM, Mark Volkmann wrote:

Why do I get an IncompatibleClassChangeError below? I'm using revision 1180.

(def my-map {:a 1 :b 2})
(namespace my-map)
java.lang.IncompatibleClassChangeError (NO_SOURCE_FILE:0)

I got a more informative message, with the difference perhaps being running Java 6 instead of Java 5:

user=> (namespace my-map)
java.lang.IncompatibleClassChangeError: Class clojure.lang.PersistentArrayMap does not implement the requested interface clojure.lang.Named (repl-1:3)

In the call to (namespace my-map), my-map is a symbol and the rule for evaluating symbols (as function arguments and elsewhere) is that they are replaced by the value of the var they name.

Your call got evaluated as (namespace {:a 1 :b 2}) which doesn't work.

What were you intending to determine in your call?

--Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to