On Wed, Dec 9, 2009 at 10:39 PM, Feng <hou...@gmail.com> wrote: > > > On Dec 7, 9:39 pm, David Nolen <dnolen.li...@gmail.com> wrote: >> http://github.com/jochu/swank-clojure/blob/master/src/main/clojure/sw... >> >> Is the offending line. > > It's really hard to reason about it in clojure source code. I see, in > jswat debbuger, the root cause of NPE appears around byte code > (putfield ...) for a mutual recursive letfn form. > > Here is a simple way to reproduce it. I did it this time with latest > master branch. Can anybody else reproduce it on different OS/JVM > version? > > (ns test.letfn) > > (defn debug [n] > (letfn [(even [n] > (if (== n 0) > true > (odd (- n 1)))) > (odd [n] > (if (== n 0) > false > (even (- n 1))))] > (odd n))) > > Listening for transport dt_socket at address: 6666 > Clojure 1.1.0-master-SNAPSHOT > user=> (require 'test.letfn) > nil > user=> (test.letfn/debug 5) > java.lang.NullPointerException (NO_SOURCE_FILE:0)
Fixed (new branch commit 42e45b9988bfa17584f2) Thanks for the report and the isolating case. Rich -- 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