|Reporter:||Bobby Eickhoff||Assignee:||Nicola Mometto|
Originally found with [org.clojure/clojurescript "0.0-2496"]
The problem does not occur if the metadata applies to a map literal instead of a function literal.
|Comment by Bobby Eickhoff [ 07/Jan/15 9:45 PM ]|
I forgot to try with-meta. Using with-meta does not produce this syntax error, so it's only a problem with the reader macro for metadata.
|Comment by David Nolen [ 08/Jan/15 7:41 AM ]|
Any quick thoughts about this one Nicola? Quite possibly a compiler issue on the CLJS side.
|Comment by Nicola Mometto [ 08/Jan/15 8:07 AM ]|
David, I understand why this happens but I don't know enough about how cljs's js emission to propose a fix.
i.e. analyze-wrap-meta changes the context of the :fn node to :expr but keeps the context of the :fn-methods to :return.
This causes both
to be true and emit a "return".