core.match

clojure.match doesn't match maps correctly inside go blocks

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:

Description

;; Tested in ClojureScript only, #clojure on freenode reports things works in Clojure.

;; This works, {:bye ...} is the first thing inside match's match list:
(go (println
(match {:bye ["cruel" "world"]}
{:bye [a b]} (str "Goodbye " a " " b)
{:hello [a b]} (str "How are you doing " n "?"))))

;; This works (no go block), {:bye ..} is second:
(println
(match {:bye ["cruel" "world"]}
{:hello [a b]} (str "How are you doing " n "?")
{:bye [a b]} (str "Goodbye " a " " b)))

;; This doesn't: Uncaught Error: :clojure.core.match/not-found is not ISeqable
;; indicating that (match ...) is probably returning not-found.
(go (println
(match {:bye ["cruel" "world"]}
{:hello [a b]} (str "How are you doing " n "?")
{:bye [a b]} (str "Goodbye " a " " b))))

Activity

Uday Verma made changes -
Field Original Value New Value
Attachment bug.cljs [ 13254 ]
David Nolen made changes -
Status Open [ 1 ] Resolved [ 5 ]
Resolution Declined [ 2 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: