<< Back to previous view

[MATCH-96] clojure.match doesn't match maps correctly inside go blocks Created: 23/Aug/14  Updated: 23/Aug/14  Resolved: 23/Aug/14

Status: Closed
Project: core.match
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Uday Verma Assignee: David Nolen
Resolution: Declined Votes: 0
Labels: None

Mac OS X 10.9.4
Leiningen 2.4.3 on Java 1.8.0_11 Java HotSpot(TM) 64-Bit Server VM

[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2311"]
[org.clojure/core.async "0.1.338.0-5c5012-alpha"]
[org.clojure/core.match "0.2.1"]

[lein-cljsbuild "1.0.4-SNAPSHOT"]]

Attachments: File bug.cljs    


;; 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:
(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))))

Comment by Uday Verma [ 23/Aug/14 9:50 AM ]

Sorry for posting code as text, attached file (bug.cljs) has the same stuff.

Comment by David Nolen [ 23/Aug/14 10:01 AM ]

core.match is mostly incompatible with core.async until core.async is further improved.

Comment by David Nolen [ 23/Aug/14 10:01 AM ]

See the core.async JIRA for other issues like this one.

Generated at Fri Mar 22 11:25:04 CDT 2019 using JIRA 4.4#649-r158309.