ClojureScript

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

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.7.48
  • Fix Version/s: Next
  • Component/s: None
  • Labels:
  • 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

Activity

Brandon Bloom made changes -
Field Original Value New Value
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
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__".


{code}
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
{code}

https://gist.github.com/4185793
David Nolen made changes -
Affects Version/s 0.0-3115 [ 10352 ]
Fix Version/s Next [ 10355 ]
David Nolen made changes -
Fix Version/s Next [ 10355 ]
Fix Version/s Backlog [ 10356 ]
Affects Version/s 0.0-3115 [ 10352 ]
Affects Version/s Next [ 10355 ]
David Nolen made changes -
Fix Version/s Next [ 10356 ]
Fix Version/s Backlog [ 10362 ]
David Nolen made changes -
Fix Version/s Next [ 10362 ]
Fix Version/s Backlog [ 10363 ]
Affects Version/s 0.0-3196 [ 10355 ]
Affects Version/s Next [ 10362 ]
David Nolen made changes -
Fix Version/s Next [ 10363 ]
Fix Version/s Backlog [ 10365 ]
Affects Version/s 0.0-3255 [ 10362 ]
Affects Version/s Next [ 10363 ]
David Nolen made changes -
Fix Version/s Next [ 10365 ]
Fix Version/s Backlog [ 10366 ]
David Nolen made changes -
Fix Version/s 1.7.28 [ 10366 ]
Fix Version/s Next [ 10450 ]
Affects Version/s 0.0-3269 [ 10363 ]
Affects Version/s 1.7.28 [ 10366 ]
David Nolen made changes -
Fix Version/s Next [ 10450 ]
Fix Version/s Backlog [ 10651 ]
Affects Version/s 1.7.28 [ 10366 ]
Affects Version/s Next [ 10450 ]

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated: