Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Reproduce:

(def ^:const ccc 1) (case 1 ccc :yes :no) (case 1 ccc :yes :hmm :hmm :no)

Second example yields :no because it falls back to {{cond}} which doesn't handle the consts properly.

3 Answers

0 votes
by

Comment made by: hiredman

a related thread https://groups.google.com/d/msg/clojure/u1RZsmjbQ64/p7B9eRwuAQAJ

clojurescript's handling of symbols in case is broken(it diverges from clojure's), but the cond fallback is correct(it matches clojure)

0 votes
by

Comment made by: dnolen

As discussed in that thread we're not re-breaking a thing we broke 2 years ago. It's simply not that important and far too late.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2102 (reported by aralo)
...