<!-- 
RSS generated by JIRA (4.4#649-r158309) at Wed May 22 06:34:16 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/CLJS-300/CLJS-300.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>[CLJS-300] RegExp objects print incorrectly</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-300</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;#&quot;x&quot; is currently printing as #&amp;lt;/x/&amp;gt;&lt;/p&gt;

&lt;p&gt;js/RegExp needs an IPrintable implementation: (-pr-seq &lt;span class=&quot;error&quot;&gt;&amp;#91;re _&amp;#93;&lt;/span&gt; (list &quot;#\&quot;&quot; (.-source re) &quot;\&quot;&quot;))&lt;/p&gt;

&lt;p&gt;Unfortunately, this is blocked by the same GClosure issue as &lt;a href=&quot;http://dev.clojure.org/jira/browse/CLJS-68&quot;&gt;http://dev.clojure.org/jira/browse/CLJS-68&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15511">CLJS-300</key>
            <summary>RegExp objects print incorrectly</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="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="bbloom">Brandon Bloom</reporter>
                        <labels>
                        <label>patch</label>
                        <label>patch,</label>
                    </labels>
                <created>Mon, 4 Jun 2012 15:43:37 -0500</created>
                <updated>Mon, 4 Jun 2012 23:52:42 -0500</updated>
                    <resolved>Mon, 4 Jun 2012 23:52:42 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="28711" author="dnolen" created="Mon, 4 Jun 2012 15:58:24 -0500"  >&lt;p&gt;The simplest solution is to add a RegExp case to pr-seq.&lt;/p&gt;</comment>
                    <comment id="28712" author="bbloom" created="Mon, 4 Jun 2012 18:09:44 -0500"  >&lt;p&gt;That was surprisingly not that simple...&lt;/p&gt;

&lt;p&gt;(instance? js/RegExp obj) compiles to `cljs.core.instance_QMARK_.call(null, RegExp, obj)` which also triggers the GClosure warning. So I thought I could inline `instance?` with a macro, but the instanceof operator&apos;s operands are in reverse order of instance?&apos;s arguments. To preserve evaluation order, the expansion would be `(let &lt;a href=&quot;#~t&quot;&gt;t# ~t&lt;/a&gt; (&lt;sub&gt;&apos;js* &quot;(&lt;/sub&gt;{} instanceof ~{})&quot; ~o t#))) however even that triggers the warning because the output leaves RegExp as an expression by itself again. I wound up just special-casing simple instanceof checks against symbols in the macro.&lt;/p&gt;

&lt;p&gt;Attached patch fixes printing of RegExp objects and also enables calling (instance? js/RegExp X) without triggering the warning. Sadly, any more complex expression which evaluates to js/RegExp, or any higher order usage of instance? against that type will still trigger the warning.&lt;/p&gt;</comment>
                    <comment id="28713" author="bbloom" created="Mon, 4 Jun 2012 19:15:32 -0500"  >&lt;p&gt;As discussed, will make a separate ticket for inlining &apos;instance? and will (defn regexp? &lt;span class=&quot;error&quot;&gt;&amp;#91;o&amp;#93;&lt;/span&gt; (js* &quot;~{o} instanceof RegExp&quot;))&lt;/p&gt;</comment>
                    <comment id="28715" author="bbloom" created="Mon, 4 Jun 2012 20:46:21 -0500"  >&lt;p&gt;Updated with simplified patch&lt;/p&gt;</comment>
                    <comment id="28716" author="dnolen" created="Mon, 4 Jun 2012 23:52:42 -0500"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/63cd8ce9c7c9a8864deb676f2b855b8018698d57&quot;&gt;http://github.com/clojure/clojurescript/commit/63cd8ce9c7c9a8864deb676f2b855b8018698d57&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11292" name="print-regexp2.patch" size="1955" author="bbloom" created="Mon, 4 Jun 2012 20:42:37 -0500" />
                    <attachment id="11291" name="print-regex.patch" size="3663" author="bbloom" created="Mon, 4 Jun 2012 18:10:01 -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>