{:as x} destructuring with an empty list raises exception

Description

1 2 3 4 5 6 7 8 9 10 11 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

Environment

None

Status

Assignee

Unassigned

Reporter

tcrawley

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.5

Priority

Major