ClojureScript

Duplicate set/map keys when using characters or quoting

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.293
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

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?

Activity

Hide
Mike Fikes added a comment -

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

Set literal contains duplicate key: a
Show
Mike Fikes added a comment - FWIW, tools.reader, used in self-hosted ClojureScript, rejects the first two examples with a diagnostic:
Set literal contains duplicate key: a

People

  • Assignee:
    Unassigned
    Reporter:
    A. R
Vote (0)
Watch (0)

Dates

  • Created:
    Updated: