core.async

Record literals become ordinary maps

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    CLJS
  • Approval:
    Triaged

Description

(require '[clojure.core.async :refer (<!! go)])
(defrecord Foo [x])
(def f (Foo. 4))
(<!! (go f))
;; => #user.Foo{:x 4}
;; OK

(<!! (go #clojure.core.async.Foo{:x 4}))
;; CLJ: => #user.Foo{:x 4}   ;; expected
;; CLJS => {:x 4}            ;; wrong

Approach: Query the analyzer to know if we have a record or not.

(Copied from GitHub issue #13 - https://github.com/clojure/core.async/issues/13)

Activity

Hide
Ghadi Shayban added a comment -

0c6e663493 contains a fix on the Clojure side, would appreciate help porting to cljs.

Show
Ghadi Shayban added a comment - 0c6e663493 contains a fix on the Clojure side, would appreciate help porting to cljs.
Hide
David Nolen added a comment -

I think on the ClojureScript we'll have to query the analyzer to know if we have a record or not.

Show
David Nolen added a comment - I think on the ClojureScript we'll have to query the analyzer to know if we have a record or not.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: