I get different error (running from REPL): (test2 (+ 1 1)) => java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:0) (test2 10) => java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:0)
I think that it has to do with 'test1' in your macro. Function 'test1' gets compiled into a Java class and it seems that compiler cannot find it or use it properly. Try to quote it (since map {} evaluates its elements}: (defmacro test2 [form] (list 'list form {:a 'test1})) (macroexpand-1 '(test2 (+ 1 1))) => (list (+ 1 1) {:a test1}) (test2 (+ 1 1)) => (2 {:a #<user$test1__1 user$test1...@12611a7>}) I am not sure if this is a bug or not... On Feb 24, 11:35 pm, MikeM <michael.messini...@invista.com> wrote: > Under SVN 1303, I'm getting a ClassNotFoundException from a macro. > Here's a simplified example of the problem: > > (defn test1 [x] (+ x 1)) > > (defmacro test2 > [form] (list 'list form {:a test1})) > > (test2 (+ 1 1)) => java.lang.ClassNotFoundException: user$test1__3765 > > Is this a bug? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---