<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sat May 25 17:38:04 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/si/jira.issueviews:issue-xml/CLJ-1173/CLJ-1173.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-1173] One-arg protocol functions whose name begins in a dash generates a call to a wrong field in the emitted code</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1173</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&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;(defprotocol P (-foo [&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;]))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This code generates a reflective call to a non-existing &lt;tt&gt;foo&lt;/tt&gt; field instead of the correct &lt;tt&gt;-foo&lt;/tt&gt; method.&lt;/p&gt;

&lt;p&gt;I was told by Christophe Grand that changing the &lt;a href=&quot;https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_deftype.clj#L557&quot;&gt;line 557 in core_deftype.clj&lt;/a&gt; from:&lt;/p&gt;

&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;(. ~(with-meta target {:tag on-&lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt;}) ~(or on-method method) ~@(&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; gargs))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to&lt;/p&gt;

&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;(. ~(with-meta target {:tag on-&lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt;}) (~(or on-method method) ~@(&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; gargs)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;is a quick fix. However I don&apos;t know too much about the compilation specifics of &lt;tt&gt;.&lt;/tt&gt; to judge whether this is the correct fix.&lt;/p&gt;

&lt;p&gt;Issue reproduction:&lt;/p&gt;
&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;Clojure
user=&amp;gt; (set! *warn-on-reflection* &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
user=&amp;gt; (defprotocol P (-foo [&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;]))
P
Reflection warning, REPL:4 - reference to field foo can&apos;t be resolved.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Clojure 1.4</environment>
            <key id="16035">CLJ-1173</key>
            <summary>One-arg protocol functions whose name begins in a dash generates a call to a wrong field in the emitted code</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="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="mbrandmeyer">Meikel Brandmeyer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Mar 2013 04:48:28 -0600</created>
                <updated>Fri, 17 May 2013 13:36:40 -0500</updated>
                    <resolved>Fri, 17 May 2013 13:36:40 -0500</resolved>
                            <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31101" author="cldwalker" created="Fri, 17 May 2013 13:36:40 -0500"  >&lt;p&gt;&lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJ-1202&quot; title=&quot;protocol fns with dashes may get compiled into property access when used higher order&quot;&gt;CLJ-1202&lt;/a&gt; addresses this exact issue with the same fix and includes tests&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>
</channel>
</rss>