Clojure

Disappearance of non-evaluated metadata for empty local collection

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

It's a contrived example, but it shows the problem:

Clojure 1.6.0-master-SNAPSHOT
user=> (def v (quote ^{x 3} []))
#'user/v
user=> (meta v)
{x 3}
user=> (let [v (quote ^{x 3} [])] (meta v))
nil ;; BUG, it should return {x 3}
user=> (let [v (read-string "^{x 3} []")] (meta v))
{x 3}
user=> (let [v (quote ^{x 3} [1 2 3])] (meta v))
{x 3} ;; Non empty colls behave correctly.

Activity

Nicola Mometto made changes -
Field Original Value New Value
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: