cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
2020-09-06T16:02:34.080900Z

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

thheller 2020-09-06T18:08:16.083400Z

@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

2020-09-06T18:10:41.084Z

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

thheller 2020-09-06T18:13:39.085700Z

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

2020-09-06T19:07:27.085900Z

is this it? https://clojure.atlassian.net/browse/CLJS-871

thheller 2020-09-06T19:10:30.086100Z

ah yeah thats it

2020-09-06T19:10:38.086300Z

cool that's useful, thanks