> Not sure if this has been reported before - I searched JIRA and the
> mailing list, but couldn't find anything, but it's difficult to search for
> "_"…
>
> Bug?
> Mapping limitation?
>

This behavior comes from cljs.compiler/munge, I'd say it's a mapping
limitation that should be considered a bug.
A possible fix would be to replace _ with _UNDERSCORE_ in munge.

Notice that clojure.core/munge has the same limitation and should probably
fixed aswell:

(defn foo-bar []
  "DASH")

(defn foo_bar []
  "UNDERSCORE")

(defn -main []
  (println "Dash version: " (foo-bar))
  (println "Underscore version: " (foo_bar)))


When AOT compiling this example and running it, it prints:

Dash version:  UNDERSCORE
Underscore version:  UNDERSCORE

as opposed to the expected

Dash version:  DASH
Underscore version:  UNDERSCORE

when running from source.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to