This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-06
Channels
- # admin-announcements (2)
- # beginners (7)
- # boot (99)
- # cider (2)
- # cljs-dev (50)
- # clojure (58)
- # clojure-austin (3)
- # clojure-australia (9)
- # clojure-berlin (8)
- # clojure-china (1)
- # clojure-dev (15)
- # clojurescript (183)
- # clojutre (2)
- # clr (1)
- # cursive (106)
- # datomic (25)
- # editors (5)
- # incanter (21)
- # ldnclj (47)
- # off-topic (11)
- # om (8)
- # overtone (5)
- # re-frame (28)
- # reagent (12)
- # testing (7)
@bronsa: Tail clearing is broken in t.a.j. due to incorrect code analysis. Proper fix and explanation is in the commit message to http://dev.clojure.org/jira/browse/CLJ-1793
Turns out all loop bodies are analyzed in RETURN context even if the loop isn't RETURN context
(let [x (atom 5)
bad (fn []
(loop [] (System/getProperties))
(swap! x dec)
(if (pos? @x)
(recur)
(count [])))]
(bad))
That will NPE on 1.8.0-alpha4. (System/getProperties) is a tail call because loop bodies are always RETURN context
cool. Wasn't certain you had taken the same (incorrect) approach that I did where C.RETURN == tail call
You probably don't do this in t.a.j https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6333
Hmm, actually https://github.com/clojure/tools.analyzer/blob/master/src/main/clojure/clojure/tools/analyzer.clj#L514