Hi,

Whenever a seq form is preceded by #^metadata, the metadata is ignored
or only {:line n} is associated with.

For example, these return the metadata as expected:

(meta (with-meta '(1) {:v 1}))
(meta (with-meta (quote (1)) {:v 1}))
(meta (with-meta (list 1) {:v 1}))
(meta (with-meta (vector 1) {:v 1}))
(meta (with-meta (hash-map :a 1) {:v 1}))
(meta (with-meta (set [1]) {:v 1}))

But none of these equivalents work and either nil or {:line n} is
returned:

(meta #^{:v 1} '(1))
(meta #^{:v 1} (quote (1)))
(meta #^{:v 1} (list 1))
(meta #^{:v 1} (vector 1))
(meta #^{:v 1} (hash-map :a 1))
(meta #^{:v 1} (set [1]))

However, these work (because what's following is a non-seq form):

(meta #^{:v 1} [1])
(meta #^{:v 1} {:a 1})
(meta #^{:v 1} #{1})

Looking at the Clojure source code, it looks like
LispReader.MetaReader does associate the metadata to the seq form but
it's ignored when the seq form is analyzed by Compiler.analyzeSeq.

Is this by design?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to