Uploaded image for project: 'ClojureScript'
  1. CLJS-434

ClojureScript compiler prepends "self__" to defmulti forms when metadata in form of ^:field.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: 1.7.145
    • Fix versions: 1.9.671
    • Labels:
      None
    • Environment:

      Mac OS X (10.7), java version "1.6.0_37", leiningen 2 preview 10, cljsbuild 0.2.9.
      clojure/clojurescript master 01 December 2012 - 5ac1503

      Description

      Using the def form, with the specific metadata ^:field causes the cljs compiler
      to prepend "self__" to the output js form.

      The browser (latest chrome/firefox) does not recognize "self__".

      Test Case: Tested against master: 5ac1503
      -------------
      
      (ns test-def)
      
      (def ^:foo e identity)
      e
      ; test_def.e = cljs.core.identity;
      ; test_def.e;
      
      (def ^:field f identity)
      f
      ; test_def.f = cljs.core.identity;
      ; self__.test_def.f;
      ; Uncaught ReferenceError: self__ is not defined
      

      https://gist.github.com/4185793

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andrewmcveigh Andrew Mcveigh
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: