Fork me on GitHub
#core-async
<
2021-08-26
>
jjttjj21:08:25

In clojurescript, I have a data reader #x that turns a string into a record. Is there any known issue or obvious reason why the first line returns the correct (record) type but the second line returns a hash map?

(println "A" (type #x"xdata"))
(go (println "B" (type #x"xdata")))

hiredman21:08:54

the analyzer the clojurescript sides uses is pretty clown shoes, what is happening is here https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/impl/ioc_macros.clj#L403 map? is returning true so it is compiling your record as a map

jjttjj21:08:53

That'll do it, thanks!