I verified the problem in the StackOverflow post. For some reason keyword
lookup of record fields in CLJS doesn't work.
Alan
On Tue, Aug 4, 2020 at 12:05 PM Justin Smith wrote:
> I don't think this is true, or if true is incidental to the real problem
>
> % cljs
> ClojureScript 1.10.758
> cljs.
I don't think this is true, or if true is incidental to the real problem
% cljs
ClojureScript 1.10.758
cljs.user=> (defrecord Attr [has-default default])
cljs.user/Attr
cljs.user=> (get (->Attr true 1) :default)
1
cljs.user=> (:default (->Attr true 1))
nil
cljs.user=>
On Tue, Aug 4, 2020 at 11:53
You misspelled default in your defrecord.
On Tue, Aug 4, 2020 at 7:42 AM 'clartaq' via Clojure <
clojure@googlegroups.com> wrote:
> I originally posted
> <https://stackoverflow.com/questions/63231270/accessing-record-fields-with-keywords-in-clojurescript-not-working
I originally posted
<https://stackoverflow.com/questions/63231270/accessing-record-fields-with-keywords-in-clojurescript-not-working-as-in-clojure>
this on StackOverflow.
When I try this:
```clojure
(defrecord Attr [has-default default])
(def attr (->Attr true 1))
(get attr :defaul