Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Related: CLJS-1587

This ticket deals with the following cases:

`
{'0 "a", 0 "b", \a "a", "a" "b"}

{\a "a"}

(hash-set \a "a")
(array-map '0 "a", 0 "b", \a "a", "a" "b")
`

Potential idea: Use {{emit-str}} in {{cljs.compiler}} on the keys/set-members and only then check for uniqueness. I'm not sure if this is a good idea though. Anybody have thoughts on this?

2 Answers

0 votes
by

Comment made by: mfikes

FWIW, {{tools.reader}}, used in self-hosted ClojureScript, rejects the first two examples with a diagnostic:

Set literal contains duplicate key: a

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2087 (reported by aralo)
...