ClojureScript

Case fallback (cond) doesn't match consts

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.562
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

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.

Activity

Hide
Kevin Downey added a comment -

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)

Show
Kevin Downey added a comment - 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)
Hide
David Nolen added a comment -

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.

Show
David Nolen added a comment - 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.

People

  • Assignee:
    Unassigned
    Reporter:
    A. R
Vote (0)
Watch (1)

Dates

  • Created:
    Updated: