Skip to:
Types defined with deftype/defrecord which have a default field will incorrectly return nil with property access. The following example will return nil.
default
nil
(deftype Foo [default]) (let [foo (Foo. "bar")] (.-default foo))
Now that we have CLJS-1620, a warning seems like a good answer.
The warning is not desirable. Instead we should just munge and ensure property access always works.
Updated to use new refactorings
I'm sure, I'd like to avoid this kind of code duping. Cleaner in the end and better moving forward.
Are you sure, David? That might make this patch a bit more noisy. If it's not a problem I'm happy to do it.
Types defined with deftype/defrecord which have a
default
field will incorrectly returnnil
with property access. The following example will returnnil
.(deftype Foo [default]) (let [foo (Foo. "bar")] (.-default foo))