Clojure loses quoted metadata on empty literals

Description

meta on empty collections is lost:

This bug propagates to ^:const vars:

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: clj-1187-2.patch

Screened by: Alex Miller

Environment

None

Activity

Show:
Nicola Mometto
December 13, 2018, 4:52 PM

Refreshed and squashed patch

Shogo Ohta
February 15, 2019, 10:04 AM

Any chance this will be fixed yet? I've run into it recently.

Alex Miller
February 15, 2019, 1:36 PM

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

Shogo Ohta
February 15, 2019, 1:52 PM

Yey! I hope things will go smoothly

Alex Miller
August 22, 2019, 11:24 PM

Added clj-1187-2.patch with just whitespace changes, attribution retained.

Completed

Assignee

Unassigned

Reporter

Nicola Mometto

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Priority

Minor
Configure