Fork me on GitHub
#cljs-dev
<
2020-09-06
>
gfredericks16:09:34

Does anybody know if cljs defrecords are supposed to support fields named constructor , and if so, whether an issue about this has already been filed? details here: https://github.com/plumatic/schema-generators/issues/22#issuecomment-687827393

thheller18:09:16

@gfredericks there is a similar problem with default as a field name. I can't find the issue though. basically if the type of the record is known it emits "optimized" property access instead of going through the keyword. since constructor (or default) are reserved words it gets munged to .-constructor$ and thus is always nil

gfredericks18:09:41

@thheller do you know whether it's acknowledged as an issue that should be fixed?

thheller18:09:39

no clue. I was sure there was an issue but I can't find it.

thheller19:09:30

ah yeah thats it

gfredericks19:09:38

cool that's useful, thanks