Check for duplicate keys when reading sets and maps in ClojureScript impl

Description

The Clojure implementation of tools.reader delegates to some runtime support in classes in clojure.lang when reading maps and sets in order to check for duplicate keys, but the ClojureScript implementation delegates to standard lib fns (set and hash-set). This results in no duplicate key checks for the ClojureScript implementation.

Environment

None

Activity

Show:
Erik Assum
February 24, 2016, 10:16 AM
Nicola Mometto
February 24, 2016, 10:19 AM

Thanks Erik.
That article you linked describes runtime behaviour, not read-time. Read time constructs should always throw on duplicate keys, no matter what the runtime constructs do.

This patch only fixes sets, can you also extend this for map keys? Thanks!

Erik Assum
February 24, 2016, 12:01 PM

Now also done for maps.

Nicola Mometto
February 24, 2016, 12:07 PM
Completed

Assignee

Nicola Mometto

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

None

Priority

Minor