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

0 votes
in Collections by
meta on empty collections is lost:

user=> (meta '^:foo [])
nil   ;; expected {:foo true} as in:
user=> (meta '^:foo [1])
{:foo true}

This bug propagates to ^:const vars:

user=> (def ^:const foo ^:foo [])
user=> (meta foo)
user=> (meta @#'foo)
{:foo true}

*Cause:* As in CLJ-1093, empty collections are replaced with an EmptyExpr that loses meta

*Proposed:* Don't replace with EmptyExpr if meta is present.

*Patch:* 0001-Support-retrieval-of-metadata-from-quoted-empty-lite.patch

*Screened by:*

18 Answers

0 votes
_Comment made by: alexmiller_

It’s been vetted by Rich so it’s in the path to consideration.
0 votes

Comment made by: sohta

Yey! I hope things will go smoothly :)

0 votes
Reference: https://clojure.atlassian.net/browse/CLJ-1187 (reported by bronsa)