<!-- 
RSS generated by JIRA (4.4#649-r158309) at Tue Jun 18 18:32:31 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-1023/CLJ-1023.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-1023] non-tail-position try block breaks mutable fields in deftype</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-1023</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;The &lt;tt&gt;:unsynchronized-mutable&lt;/tt&gt; fields of a &lt;tt&gt;deftype&lt;/tt&gt; cannot be &lt;tt&gt;set!&lt;/tt&gt; inside a &lt;tt&gt;try&lt;/tt&gt; block that is not in tail position of the method.&lt;/p&gt;

&lt;p&gt;See file *&lt;b&gt;demonstration.clj&lt;/b&gt;* for an complete code example.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15573">CLJ-1023</key>
            <summary>non-tail-position try block breaks mutable fields in deftype</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="richhickey">Rich Hickey</assignee>
                                <reporter username="stuart.sierra">Stuart Sierra</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 Jul 2012 16:20:25 -0500</created>
                <updated>Mon, 3 Dec 2012 10:55:08 -0600</updated>
                    <resolved>Mon, 3 Dec 2012 10:55:08 -0600</resolved>
                            <version>Release 1.3</version>
                <version>Release 1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29376" author="richhickey" created="Wed, 5 Sep 2012 07:07:09 -0500"  >&lt;p&gt;I looked at this. The problem is that non-tail try blocks turn into closures, and thus the field gets propagated as a constant. IOW this can&apos;t work:&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;(deftype Foo4 [^:unsynchronized-mutable x]
  MutableX
  (set-x [&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; v]
    ((fn [] (set! x v)))
    v))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;I&apos;m not going to re-evaluate the try/closure approach right now, so I recommend you make a helper method that just does the assignment and then call that in the bigger context, as a workaround.&lt;/p&gt;</comment>
                    <comment id="30160" author="halgari" created="Mon, 3 Dec 2012 10:55:08 -0600"  >&lt;p&gt;Closing this as it requires more than a simple bug fix. If you feel that Rich&apos;s work-around is unsatisfactory please create a clojure-dev discussion about rewriting try-catch.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11370" name="demonstration.clj" size="928" author="stuart.sierra" created="Sun, 8 Jul 2012 16:20:25 -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>
</channel>
</rss>