Hi all, I wanted to create some stand-alone example that demonstrates my issue from the other thread: Message-ID: <8762l2n391....@thinkpad.tsdh.de>
While trying to fiddle something together, I became aware that any code inside #=(..) that includes java interop constructs fail. --8<---------------cut here---------------start------------->8--- user> *read-eval* true user> (new java.util.Date 1 2 3) #<Date Sun Mar 03 00:00:00 CET 1901> user> #=(new java.util.Date 1 2 3) ; Evaluation aborted. Can't resolve new [Thrown class java.lang.RuntimeException] Backtrace: 0: clojure.lang.Util.runtimeException(Util.java:156) 1: clojure.lang.LispReader$EvalReader.invoke(LispReader.java:1043) 2: clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:618) 3: clojure.lang.LispReader.read(LispReader.java:180) 4: clojure.core$read.invoke(core.clj:3344) 5: clojure.core$read.invoke(core.clj:3342) user> (.newInstance java.util.Date) #<Date Fri Sep 09 13:25:09 CEST 2011> user> #=(.newInstance java.util.Date) ; Evaluation aborted. Can't resolve .newInstance [Thrown class java.lang.RuntimeException] Backtrace: 0: clojure.lang.Util.runtimeException(Util.java:156) 1: clojure.lang.LispReader$EvalReader.invoke(LispReader.java:1043) 2: clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:618) 3: clojure.lang.LispReader.read(LispReader.java:180) 4: clojure.core$read.invoke(core.clj:3344) 5: clojure.core$read.invoke(core.clj:3342) --8<---------------cut here---------------end--------------->8--- I use a recent clojure 1.3 snapshot. Is that the expected behavior? Hm, but even without the reader #=(..) syntax, there's some strangeness: --8<---------------cut here---------------start------------->8--- user> (. java.util.Date newInstance) ; Evaluation aborted. java.lang.NoSuchFieldException: newInstance [Thrown class java.lang.RuntimeException] user> (. (identity java.util.Date) newInstance) Reflection warning, NO_SOURCE_FILE:1 - reference to field newInstance can't be resolved. #<Date Fri Sep 09 13:46:06 CEST 2011> --8<---------------cut here---------------end--------------->8--- Why do I have to use identity here? Bye, Tassilo -- 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 Note that posts from new members are moderated - please be patient with your first post. 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