<!--
RSS generated by JIRA (4.4#649-r158309) at Wed May 22 04:57:46 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=labels+%3D+Compiler&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=labels+%3D+Compiler</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="9" total="9"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[CLJS-476] Reading a value from a module does not work if the module is def&apos;ed</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-476</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Referring to a value in a module can have a scoping issue when using the &quot;static accessor&quot; operator of module/VALUE_NAME. The static accessor works if the module is loaded into a local value but not if def&apos;ed. This example uses the mmap module for Node.js, and successfully reads the PROT_READ value:&lt;/p&gt;

&lt;p&gt;(ns stat.core)&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (let &lt;span class=&quot;error&quot;&gt;&amp;#91;m (js/require &amp;quot;mmap&amp;quot;)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (println &quot;value: &quot; m/PROT_READ)))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;

&lt;p&gt;This correctly prints &quot;value: 1&quot;&lt;/p&gt;

&lt;p&gt;However, if the value for m is def&apos;ed instead, then the compiler assumes that the reference to m is local to the function and therefore not defined:&lt;/p&gt;

&lt;p&gt;(ns stat.core)&lt;br/&gt;
(def m (js/require &quot;mmap&quot;))&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (println &quot;value: &quot; m/PROT_READ))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;

&lt;p&gt;/Users/pag/src/test/clj/stat/target/stat.js:12836&lt;br/&gt;
  return cljs.core.println.call(null, &quot;value: &quot;, m.PROT_READ)&lt;br/&gt;
                                                 ^&lt;br/&gt;
ReferenceError: m is not defined&lt;br/&gt;
    at Function.stat.core._main (/Users/pag/src/test/clj/stat/target/stat.js:12836:50)&lt;br/&gt;
    at cljs.core.apply.b (/Users/pag/src/test/clj/stat/target/stat.js:5621:14)&lt;br/&gt;
    at cljs.core.apply.a (/Users/pag/src/test/clj/stat/target/stat.js:5656:18)&lt;br/&gt;
    at Object.&amp;lt;anonymous&amp;gt; (/Users/pag/src/test/clj/stat/target/stat.js:12844:17)&lt;br/&gt;
    at Module._compile (module.js:449:26)&lt;br/&gt;
    at Object.Module._extensions..js (module.js:467:10)&lt;br/&gt;
    at Module.load (module.js:356:32)&lt;br/&gt;
    at Function.Module._load (module.js:312:12)&lt;br/&gt;
    at Module.runMain (module.js:492:10)&lt;br/&gt;
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)&lt;/p&gt;

&lt;p&gt;In this case, the value of m.PROT_READ should have been stat.core.m.PROT_READ.&lt;/p&gt;

&lt;p&gt;On the other hand, using . syntax fixes the scoping issue:&lt;br/&gt;
(ns stat.core)&lt;br/&gt;
(def m (js/require &quot;mmap&quot;))&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (println &quot;value: &quot; (.-PROT_READ m)))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;
</description>
                <environment>Clojure 1.5.0-RC16 &lt;br/&gt;
Clojurescript 0.0-1586 &lt;br/&gt;
java version &amp;quot;1.7.0_04&amp;quot; &lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_04-b21) &lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode) &lt;br/&gt;
OSX Mountain Lion 10.8.2</environment>
            <key id="16025">CLJS-476</key>
            <summary>Reading a value from a module does not work if the module is def&apos;ed</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="quoll">Paul Gearon</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                        <label>scope</label>
                    </labels>
                <created>Fri, 22 Feb 2013 13:13:40 -0600</created>
                <updated>Fri, 22 Feb 2013 13:13:40 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-475] Node.js target fails with optimizations set to :none or :whitespace</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-475</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;Compiling a hello world program for Node.js works fine if using optimizations of :advanced or :simple, but if using :none or :whitespace then an error will be reported for either &quot;goog undefined&quot; or &quot;goog.string&quot; undefined respectively.&lt;/p&gt;

&lt;p&gt;The program is shown here:&lt;/p&gt;

&lt;p&gt;(ns pr.core)&lt;br/&gt;
(defn -main []&lt;br/&gt;
  (println &quot;Hello World!&quot;))&lt;br/&gt;
(set! &lt;b&gt;main-cli-fn&lt;/b&gt; -main)&lt;/p&gt;

&lt;p&gt;This program is in src/cljs/pr/core.cljs. The repl line used to compile is:&lt;br/&gt;
(cljs.closure/build &quot;src/cljs&quot; {:output-to &quot;src/js/pr.js&quot; :target :nodejs :pretty-print true :optimizations :none})&lt;/p&gt;

&lt;p&gt;When compiled with optimizations of :none, the output is:&lt;/p&gt;

&lt;p&gt;$ node src/js/pr.js &lt;/p&gt;

&lt;p&gt;/Users/pag/src/test/clj/pr/src/js/pr.js:1&lt;br/&gt;
(function (exports, require, module, __filename, __dirname) { goog.addDependen&lt;br/&gt;
                                                              ^&lt;br/&gt;
ReferenceError: goog is not defined&lt;br/&gt;
    at Object.&amp;lt;anonymous&amp;gt; (/Users/pag/src/test/clj/pr/src/js/pr.js:1:63)&lt;br/&gt;
    at Module._compile (module.js:449:26)&lt;br/&gt;
    at Object.Module._extensions..js (module.js:467:10)&lt;br/&gt;
    at Module.load (module.js:356:32)&lt;br/&gt;
    at Function.Module._load (module.js:312:12)&lt;br/&gt;
    at Module.runMain (module.js:492:10)&lt;br/&gt;
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;br/&gt;
When running with optimizations of :whitespace the output is:&lt;/p&gt;

&lt;p&gt;$ node src/js/pr.js &lt;/p&gt;

&lt;p&gt;/Users/pag/src/test/clj/pr/src/js/pr.js:493&lt;br/&gt;
goog.string.Unicode = {NBSP:&quot;\u00a0&quot;};&lt;br/&gt;
                    ^&lt;br/&gt;
TypeError: Cannot set property &apos;Unicode&apos; of undefined&lt;br/&gt;
    at Object.&amp;lt;anonymous&amp;gt; (/Users/pag/src/test/clj/pr/src/js/pr.js:493:21)&lt;br/&gt;
    at Module._compile (module.js:449:26)&lt;br/&gt;
    at Object.Module._extensions..js (module.js:467:10)&lt;br/&gt;
    at Module.load (module.js:356:32)&lt;br/&gt;
    at Function.Module._load (module.js:312:12)&lt;br/&gt;
    at Module.runMain (module.js:492:10)&lt;br/&gt;
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;br/&gt;
When running with optimizations of either :simple or :advanced, the output is:&lt;/p&gt;

&lt;p&gt;$ node src/js/pr.js &lt;br/&gt;
Hello World!&lt;/p&gt;

&lt;p&gt;&amp;#8212;&lt;br/&gt;
I have included the two javascript output files that match the above errors.&lt;/p&gt;</description>
                <environment>Clojure 1.5.0-RC16&lt;br/&gt;
Clojurescript 0.0-1586&lt;br/&gt;
java version &amp;quot;1.7.0_04&amp;quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.7.0_04-b21)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)&lt;br/&gt;
OSX Mountain Lion 10.8.2</environment>
            <key id="16023">CLJS-475</key>
            <summary>Node.js target fails with optimizations set to :none or :whitespace</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="quoll">Paul Gearon</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Thu, 21 Feb 2013 16:34:15 -0600</created>
                <updated>Fri, 1 Mar 2013 13:26:48 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30641" author="quoll" created="Thu, 21 Feb 2013 16:40:49 -0600"  >&lt;p&gt;Remaining generated files&lt;/p&gt;</comment>
                    <comment id="30650" author="dnolen" created="Mon, 25 Feb 2013 15:46:41 -0600"  >&lt;p&gt;This is a known bug. We need goog.require/provide to actually mean something to Node.js. I&apos;m not sure how this can be made to work. I&apos;ve been hoping for a patch for this since ClojureScript was first announced, but I haven&apos;t seen anything yet.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11869" name="out-none.tar.gz" size="170636" author="quoll" created="Thu, 21 Feb 2013 16:40:49 -0600" />
                    <attachment id="11870" name="out-whitespace.tar.gz" size="125424" author="quoll" created="Thu, 21 Feb 2013 16:40:49 -0600" />
                    <attachment id="11867" name="pr.js-none" size="411" author="quoll" created="Thu, 21 Feb 2013 16:34:15 -0600" />
                    <attachment id="11868" name="pr.js-whitespace" size="758335" author="quoll" created="Thu, 21 Feb 2013 16:34:15 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJS-100] binding breaks in macros</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-100</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;When creating a macro that results in a binding the name of the global bound variables resolves into namespace bound names - this breaks the assert in clojurescripts let code.&lt;/p&gt;

&lt;p&gt;example (simplified):&lt;br/&gt;
(ns clgl.macros)&lt;br/&gt;
(defmacro with-gl [&lt;span class=&quot;error&quot;&gt;&amp;#91;gl prog&amp;#93;&lt;/span&gt; &amp;amp; body]&lt;br/&gt;
  `(binding &lt;span class=&quot;error&quot;&gt;&amp;#91;*gl* ~gl *prog* ~brog&amp;#93;&lt;/span&gt; ~@body))&lt;/p&gt;

&lt;p&gt;(ns clgl.core&lt;br/&gt;
  (:require-macros &lt;span class=&quot;error&quot;&gt;&amp;#91;clgl.macros :as m&amp;#93;&lt;/span&gt;))&lt;br/&gt;
...&lt;br/&gt;
(with-gl &lt;span class=&quot;error&quot;&gt;&amp;#91;gl prog&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (do-something))&lt;/p&gt;</description>
                <environment>unimportant</environment>
            <key id="15004">CLJS-100</key>
            <summary>binding breaks in macros</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="licenser">Heinz N. Gies</reporter>
                        <labels>
                        <label>Compiler</label>
                    </labels>
                <created>Fri, 11 Nov 2011 19:21:09 -0600</created>
                <updated>Tue, 10 Jan 2012 23:20:59 -0600</updated>
                    <resolved>Tue, 10 Jan 2012 23:20:59 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="27316" author="dnolen" created="Sun, 20 Nov 2011 13:18:33 -0600"  >&lt;p&gt;I&apos;m not sure I follow. What does &lt;b&gt;gl&lt;/b&gt; and &lt;b&gt;prog&lt;/b&gt; get namespaced to?&lt;/p&gt;</comment>
                    <comment id="27517" author="wagjo" created="Mon, 9 Jan 2012 14:46:22 -0600"  >&lt;p&gt;I think he has a problem with &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;*gl*&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; resolving into &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;clgl.macros/*gl*&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; when expanding macro, and this produces error in clojurescript (no such ns exists in cljs).&lt;/p&gt;

&lt;p&gt;Solution is to use &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;~&apos;*gl*&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; instead of &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;*gl*&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; inside macro.&lt;/p&gt;

&lt;p&gt;So IMO this issue is not a CLJS defect and should be closed.&lt;/p&gt;</comment>
                    <comment id="27529" author="dnolen" created="Tue, 10 Jan 2012 23:20:59 -0600"  >&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-114&quot;&gt;http://dev.clojure.org/jira/browse/CLJS-114&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1184] Evaling #{do ...} or [do ...] is treated as the do special form</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1184</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Evaluating a persistent collection for which the function &apos;first&apos; returns the symbol &apos;do&apos; leads to that collection being treated as the do special form, even though it may be a vector or even a set. IMHO, the expected result would be to report that &apos;do&apos; cannot be resolved. For the cause, see the if condition on line 6604 of Compiler.java in clojure-1.5.1.&lt;/p&gt;

&lt;p&gt;E.g.:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;do 1 2&amp;#93;&lt;/span&gt;&lt;br/&gt;
;=&amp;gt; 2&lt;/p&gt;

&lt;p&gt;#{&quot;hello&quot; &quot;goodbye&quot; do}&lt;br/&gt;
;=&amp;gt; &quot;hello&quot;&lt;br/&gt;
; Wat?&lt;/p&gt;</description>
                <environment></environment>
            <key id="16093">CLJ-1184</key>
            <summary>Evaling #{do ...} or [do ...] is treated as the do special form</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jirkamarsik">Ji&#345;&#237; Mar&#353;&#237;k</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Sat, 16 Mar 2013 08:56:32 -0500</created>
                <updated>Fri, 12 Apr 2013 09:42:02 -0500</updated>
                                    <version>Release 1.5</version>
                                <fixVersion>Release 1.6</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10003">Vetted</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1136] Type hinting for array classes does not work in binding forms</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1136</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Type hints don&apos;t work as expected in binding forms. &lt;/p&gt;

&lt;p&gt;The following form results in a reflection warning:&lt;/p&gt;

&lt;p&gt;    (let [^{:tag (Class/forName &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;Ljava.lang.Object;&amp;quot;)} a (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
      (aget a 0))&lt;/p&gt;

&lt;p&gt;However, hinting does appear to work correctly on vars:&lt;/p&gt;

&lt;p&gt;    (def ^{:tag (Class/forName &quot;[Ljava.lang.Object;&quot;)} a (make-array Object 2))&lt;br/&gt;
    (aget a 0) ;; no reflection warning&lt;/p&gt;</description>
                <environment>replicated on OpenJDK 7u9 on Ubuntu 12.04, and Hotspot 1.6.0_37 on OSX Lion</environment>
            <key id="15911">CLJ-1136</key>
            <summary>Type hinting for array classes does not work in binding forms</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="lvanderhart">Luke VanderHart</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Thu, 20 Dec 2012 14:59:58 -0600</created>
                <updated>Fri, 21 Dec 2012 11:09:56 -0600</updated>
                                    <version>Release 1.4</version>
                <version>Release 1.5</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30272" author="gshayban" created="Thu, 20 Dec 2012 22:51:22 -0600"  >&lt;p&gt;It&apos;s a little more insidious than type hinting: the compiler doesn&apos;t evaluate metadata in the binding vec.&lt;/p&gt;

&lt;p&gt;This doesn&apos;t throw the necessary exception...&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^{:foo (Class/forName &amp;quot;not real&amp;quot;)} bar 42&amp;#93;&lt;/span&gt;&lt;br/&gt;
  bar)&lt;/p&gt;

&lt;p&gt;neither this...&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^{gyorgy ligeti} a 42&amp;#93;&lt;/span&gt;&lt;br/&gt;
  a)&lt;/p&gt;

&lt;p&gt;Gyorgy Ligeti never resolves.&lt;/p&gt;

&lt;p&gt;These two equivalent examples don&apos;t reflect: &lt;br/&gt;
(let &lt;span class=&quot;error&quot;&gt;&amp;#91;^objects a (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (aget a 0))&lt;/p&gt;

&lt;p&gt;(let &lt;span class=&quot;error&quot;&gt;&amp;#91;a ^objects (make-array Object 2)&amp;#93;&lt;/span&gt;&lt;br/&gt;
  (aget a 0))&lt;/p&gt;
</comment>
                    <comment id="30275" author="gshayban" created="Fri, 21 Dec 2012 11:09:56 -0600"  >&lt;p&gt;On only the left-hand side of a local binding, metadata on a symbol is not analyzed or evaluated.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-1028] (compile) crashes with NullPointerException if public function &apos;load&apos; is defined</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1028</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When performing AOT compilation, if the namespace being compiled or one of the namespaces :required by it defines a public function named &apos;load&apos;, the compiler will crash with a NullPointerException.&lt;/p&gt;

&lt;p&gt;The following code demonstrates this:&lt;/p&gt;

&lt;p&gt;(ns ca.ancilla.kessler.core (:gen-class)) (defn load &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x) (defn -main &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; 0)&lt;/p&gt;

&lt;p&gt;When run directly, with &apos;clojure -m ca.ancilla.kessler.core&apos; or &apos;clojure ca/ancilla/kessler/core.clj&apos;, it runs as expected. When loaded with &apos;clojure -i&apos; and (compile)d, however, or when automatically compiled by &apos;lein run&apos;, it results in a NullPointerException (the complete stack trace is attached).&lt;/p&gt;

&lt;p&gt;This occurs whether or not &apos;load&apos; or actually called. It does not, however, occur if &apos;load&apos; is private.&lt;/p&gt;</description>
                <environment>Linux, OpenJDK 1.6.0 64bit</environment>
            <key id="15584">CLJ-1028</key>
            <summary>(compile) crashes with NullPointerException if public function &apos;load&apos; is defined</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="toxicfrog">Ben Kelly</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>bug</label>
                    </labels>
                <created>Fri, 20 Jul 2012 12:40:30 -0500</created>
                <updated>Fri, 20 Jul 2012 22:06:22 -0500</updated>
                    <resolved>Fri, 20 Jul 2012 16:35:47 -0500</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29007" author="toxicfrog" created="Fri, 20 Jul 2012 12:43:33 -0500"  >&lt;p&gt;If you add (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;load&amp;#93;&lt;/span&gt;) to the (ns), it works fine:&lt;/p&gt;

&lt;p&gt;(ns ca.ancilla.kessler.core (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;load&amp;#93;&lt;/span&gt;) (:gen-class))&lt;br/&gt;
(defn load &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; x)&lt;br/&gt;
(defn -main &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;amp; args&amp;#93;&lt;/span&gt; 0)&lt;/p&gt;

&lt;p&gt;Thanks to llasram on IRC for discovering this.&lt;/p&gt;</comment>
                    <comment id="29010" author="stu" created="Fri, 20 Jul 2012 16:35:38 -0500"  >&lt;p&gt;You should not replace functions in clojure.core.  This is left legal (with a loud CONSOLE warning) for compatibility, but programs that do it are in error.&lt;/p&gt;</comment>
                    <comment id="29015" author="toxicfrog" created="Fri, 20 Jul 2012 22:06:22 -0500"  >&lt;p&gt;So, just to make sure that I have this right, then...&lt;/p&gt;

&lt;p&gt;If I want to create a namespace with a public function that shares a name with a function in clojure.core, the only supported way of doing this is to (:refer-clojure :exclude &lt;span class=&quot;error&quot;&gt;&amp;#91;list of all such functions&amp;#93;&lt;/span&gt;)?&lt;/p&gt;

&lt;p&gt;If so, it would be nice if the warning were replaced with an error, rather than having the compiler emit an error and then &lt;b&gt;crash&lt;/b&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11391" name="stack-trace" size="1541" author="toxicfrog" created="Fri, 20 Jul 2012 12:40:30 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[CLJ-918] Vars with {:macro true} meta data do not work when loaded from AOT compiled file</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-918</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;When defining a var with &lt;tt&gt;^{:macro true&lt;/tt&gt;} the call of the binded macro does emit a warning when the definition has been AOT compiled.&lt;/p&gt;

&lt;p&gt;See example outputs with demo code here: &lt;a href=&quot;https://refheap.com/paste/389&quot;&gt;https://refheap.com/paste/389&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bronsa on #clojure created a patch: &lt;a href=&quot;http://sprunge.us/bWcc&quot;&gt;http://sprunge.us/bWcc&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Tested with 1.3.0 and 1.4.0</environment>
            <key id="15145">CLJ-918</key>
            <summary>Vars with {:macro true} meta data do not work when loaded from AOT compiled file</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="jannschu">Jannik Schorg</reporter>
                        <labels>
                        <label>Compiler</label>
                        <label>enhancement</label>
                        <label>metadata</label>
                    </labels>
                <created>Mon, 23 Jan 2012 16:06:06 -0600</created>
                <updated>Thu, 13 Sep 2012 14:29:01 -0500</updated>
                    <resolved>Thu, 13 Sep 2012 14:29:01 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29437" author="jafingerhut" created="Thu, 13 Sep 2012 14:29:01 -0500"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1021&quot; title=&quot;(let [i 5] (defmacro m [v] v) m) interprets m as a function, not a macro&quot;&gt;CLJ-1021&lt;/a&gt;.  Later ticket kept in preference to this one, because it has a patch and this one does not.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10010">New</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-874] defrecord factory inaccessibly from within type implementation</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-874</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;Discovered this issue working through &lt;a href=&quot;https://github.com/relevance/labrepl&quot;&gt;https://github.com/relevance/labrepl&lt;/a&gt; when trying to use the new factory sytax for records:&lt;/p&gt;

&lt;p&gt;(defprotocol Player&lt;br/&gt;
  (choose &lt;span class=&quot;error&quot;&gt;&amp;#91;p&amp;#93;&lt;/span&gt;)&lt;br/&gt;
  (update-strategy &lt;span class=&quot;error&quot;&gt;&amp;#91;p me you&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;(defrecord Mean &lt;span class=&quot;error&quot;&gt;&amp;#91;last-winner&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&#160;Player&lt;br/&gt;
&#160;&#160;(choose &lt;span class=&quot;error&quot;&gt;&amp;#91;_&amp;#93;&lt;/span&gt; (if last-winner last-winner (random-choice)))&lt;br/&gt;
&#160;&#160;(update-strategy &lt;span class=&quot;error&quot;&gt;&amp;#91;_ me you&amp;#93;&lt;/span&gt; (-&amp;gt;Mean (when (iwon? me you) me))))&lt;/p&gt;

&lt;p&gt;Notice that Mean returns a new instance with a different strategy.  However, the factory methods are not defined until after the record has been created thus this results in a syntax error.  To fix this I updated the macro to declare the factory methods before the record is emitted.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15001">CLJ-874</key>
            <summary>defrecord factory inaccessibly from within type implementation</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="kurtharriger">Kurt Harriger</reporter>
                        <labels>
                        <label>Compiler</label>
                    </labels>
                <created>Fri, 11 Nov 2011 11:31:52 -0600</created>
                <updated>Fri, 2 Dec 2011 09:03:00 -0600</updated>
                    <resolved>Fri, 2 Dec 2011 09:03:00 -0600</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>4</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27275" author="kurtharriger" created="Fri, 11 Nov 2011 11:33:20 -0600"  >&lt;p&gt;On github: &lt;a href=&quot;https://github.com/kurtharriger/clojure/tree/fix-defrecord&quot;&gt;https://github.com/kurtharriger/clojure/tree/fix-defrecord&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="27336" author="hiredman" created="Mon, 21 Nov 2011 13:19:41 -0600"  >&lt;p&gt;looks good to me&lt;/p&gt;</comment>
                    <comment id="27348" author="aaron" created="Sat, 26 Nov 2011 11:58:45 -0600"  >&lt;p&gt;Screened against e58a87fac72ed4b84a1d92f1e455b92d7ed3ef39&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10693" name="defrecord-patch.diff" size="927" author="kurtharriger" created="Fri, 11 Nov 2011 11:31:52 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Approval</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10007">Ok</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[CLJ-865] Macroexpansion discards &amp;form metadata</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-865</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;As discussed in &lt;a href=&quot;http://groups.google.com/group/clojure/browse_thread/thread/2690cb6ca0e8beb8&quot;&gt;http://groups.google.com/group/clojure/browse_thread/thread/2690cb6ca0e8beb8&lt;/a&gt; there is a &quot;surprise factor&quot; when type-hinting an expression that represents a macro, such as with (.length ^String (doto (identity &quot;x&quot;) prn)). Here the doto macro discards the metadata on &amp;amp;form, causing a reflective lookup. This has the effect that while expressions representing function calls can be type-hinted, expressions representing macros in general cannot. The doto macro could be rewritten to respect its &amp;amp;form metadata, but doing this for every macro in existence would be tedious and error-prone. Instead, I propose a change to the compiler, to cause macroexpansion to hang onto the metadata automatically.&lt;/p&gt;

&lt;p&gt;The first patch attached adds a test for the behavior I propose: this test fails. After applying the second patch, the test passes.&lt;/p&gt;

&lt;p&gt;There are a couple points that merit further consideration before accepting my patch:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I&apos;m not sure I actually got the Java code formatted correctly. My editor is not well-configured to get the clojure/core style right automatically.&lt;/li&gt;
	&lt;li&gt;My solution is to take the &amp;amp;form metadata, drop :line/:file keys, and then merge with the returned metadata, with &amp;amp;form taking precedence. I&apos;m not sure whether this is the right approach in all cases, even though it works for :tag metadata.&lt;/li&gt;
	&lt;li&gt;I achieved this with a change to the compiler, which makes it fairly heavy-weight. It should be possible to instead adjust defmacro if changes to the compiler are not desirable. However, I believe this would involve substantially more work and be harder to test (for example, multiple arities complicate things). It seems nicer to treat the macroexpansion as a black box and then make metadata tweaks to the result, rather than modifying their actual defmacro code.&lt;/li&gt;
	&lt;li&gt;If a macro expands to something that is not an IObj, such as an Integer, then my patch silently discards the caller&apos;s metadata. Would it be better to throw an exception?&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14901">CLJ-865</key>
            <summary>Macroexpansion discards &amp;form metadata</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="amalloy">Alan Malloy</reporter>
                        <labels>
                        <label>Compiler</label>
                    </labels>
                <created>Wed, 26 Oct 2011 15:19:11 -0500</created>
                <updated>Wed, 6 Jun 2012 17:29:38 -0500</updated>
                                                                            <due></due>
                    <votes>7</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="27176" author="amalloy" created="Fri, 28 Oct 2011 01:12:50 -0500"  >&lt;p&gt;So I went ahead and did the work of making this change in clojure.core/defmacro instead of clojure.lang.Compiler/macroexpand1. It was even worse than I expected: I didn&apos;t realize we don&apos;t yet have syntax-quote or apply at this stage in bootstrapping, so writing a non-trivial macroexpansion requires a huge amount of (list `foo (list `bar &apos;local-name)) and so forth.&lt;/p&gt;

&lt;p&gt;I&apos;m sure the version I wrote is not optimal, but it seemed simpler to piggyback on defn, and then use alter-var-root to shim the metadata management in, than it would have been to expand to the correct thing in the first place.&lt;/p&gt;

&lt;p&gt;Anyway, attached patch #3 could be applied instead of #2 to resolve the issue in clojure.core instead of clojure.lang. The tests added in patch #1 pass either way.&lt;/p&gt;</comment>
                    <comment id="27286" author="amalloy" created="Sun, 13 Nov 2011 20:29:06 -0600"  >&lt;p&gt;I realized I can do this with a named private function instead of an anonymous function, reducing the amount of mess defmacro itself has to generate. Patch 4 is, I think, strictly better than Patch 3, if a Clojure implementation is preferred to one in Java.&lt;/p&gt;</comment>
                    <comment id="27331" author="chouser@n01se.net" created="Sun, 20 Nov 2011 22:43:45 -0600"  >&lt;p&gt;I prefer patch 0002 in Java over either 0003 or 0004. Patch 0002 keeps the knowledge of how to invoke macro fns (specifically the extra &amp;amp;form and &amp;amp;env args) in one place, macroexpand1 rather than duplicating that knowledge in core.clj as well. Note patch 0001 is just tests.&lt;/p&gt;

&lt;p&gt;The proposed default macroexpansion behavior is more useful than what we currently have, but there are two details I&apos;d like to think about a bit more:&lt;/p&gt;

&lt;p&gt;1) In exchange for a more useful default, macro writers lose the ability to consume their &amp;amp;form metadata and have control over the resulting form metadata without the &amp;amp;form metadata overridding it. That is, macros are no longer in complete control of their output form.&lt;/p&gt;

&lt;p&gt;2) Rule (1) above has hardcoded exceptions for :line and :file, where &amp;amp;form metadata is unable to override the results returned by the macro.&lt;/p&gt;</comment>
                    <comment id="28676" author="amalloy" created="Fri, 1 Jun 2012 14:04:02 -0500"  >&lt;p&gt;This patch incorporates all previous patches to this issue.&lt;/p&gt;

&lt;p&gt;On the clj-dev mailing list, Andy Fingerhut suggested a new metadata key for allowing the macro author to specify &quot;I&apos;ve looked at their &amp;amp;form metadata, and this form is exactly what I want to expand to, please don&apos;t change the metadata any further.&quot; I&apos;ve implemented this, and I think it addresses Chouser&apos;s concern about needing a way to &quot;break out&quot; of the improved-default behavior.&lt;/p&gt;

&lt;p&gt;One open question is, is :explicit-meta the right key to use? I spent some time tracking down a bug caused by my forgetting the keyword and using :explicit-metadata in my test; perhaps something more difficult to get confused by is available.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10590" name="0001-Add-test-for-macroexpansion-metadata-preservation.patch" size="1258" author="amalloy" created="Wed, 26 Oct 2011 15:19:11 -0500" />
                    <attachment id="10591" name="0002-Preserve-form-metadata-on-macroexpanded-forms.patch" size="1571" author="amalloy" created="Wed, 26 Oct 2011 15:19:11 -0500" />
                    <attachment id="10592" name="0003-Make-defmacro-preserve-form-metadata.patch" size="3898" author="amalloy" created="Fri, 28 Oct 2011 01:12:50 -0500" />
                    <attachment id="10703" name="0004-Another-stab-at-implementing-this.patch" size="3397" author="amalloy" created="Sun, 13 Nov 2011 20:29:06 -0600" />
                    <attachment id="11281" name="updated.patch" size="3824" author="amalloy" created="Fri, 1 Jun 2012 14:04:02 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>