Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: Release 1.5
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
user=> (clojure-version)
"1.4.0"
user=> (let [{:as x} '()] x)
{}
...
user=> (clojure-version)
"1.5.0-RC1"
user=> (let [{:as x} '()] x)
IllegalArgumentException No value supplied for key: null clojure.lang.PersistentHashMap.create (PersistentHashMap.java:77)
The bug was introduced by a change[1] to support duplicate keys in map
destructuring. Using PersistentHashMap/create here introduces the above
bug, since it does not properly handle empty lists.
[1]: https://github.com/clojure/clojure/commit/93c795fe10ee5c92a36b6ec6373b3c80a31135c4
Attachments
Activity
Toby Crawley
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Patch | Code and Test [ 10002 ] | |
| Attachment | empty-list-destructuring-CLJ-1140-12.30.12.diff [ 11782 ] |
Rich Hickey
made changes -
| Approval | Ok [ 10007 ] | |
| Fix Version/s | Release 1.5 [ 10150 ] |
Rich Hickey
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Stuart Halloway
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
There's been some discussion on clojure-dev around this issue: https://groups.google.com/d/topic/clojure-dev/qdDRNfEVfQ8/discussion