nasser / magic

Morgan And Grand Iron Clojure
http://nas.sr/magic/
365 stars 18 forks source link

letfn test failing #218

Open nasser opened 3 years ago

nasser commented 3 years ago
(clojure.core/= (letfn [(even2 [n] (neven? n)) (neven? [n] (if (zero? n) true (nodd? (dec n)))) (nodd? [n] (if (zero? n) false 

(neven? (dec n))))] [(even2 91) (even2 90)]) (magic.api/eval (quote (letfn [(even2 [n] (neven? n)) (neven? [n] (if (zero? n) true 

(nodd? (dec n)))) (nodd? [n] (if (zero? n) false (neven? (dec n))))] [(even2 91) (even2 90)]))))

  actual: System.NullReferenceException: Object reference not set to an instance of an object

 at <magic>magic_test_letfn$even2__0.invoke (:0)
    <magic>magic_test_letfn$<fn>__1.invoke (:0)

originally reported in https://github.com/flybot-sg/magic/issues/14