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

0 votes
in ClojureScript by

In clojurescript, I have a data reader that returns a record from a tagged literal:

(ns x.x)

(defrecord X [y])

(defn make-x [y] (->X y))


{x x.x/make-x}

This doesn't work correctly inside of go blocks:

(println "outside of go:" #x"a")
  (println "inside of go:" (<! (go #x"b"))))

Results in:

outside of go: #x.x.X{:y a}
inside of go: {:y b}

@hiredman on the clojurians slack pointed out the issue:

what is happening is here

map? is returning true so it is compiling your record as a map

1 Answer

+1 vote