<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sat May 25 12:33: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/si/jira.issueviews:issue-xml/CLJS-458/CLJS-458.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-458] get-in throws exception when key-list contains key that doesn&apos;t satisfy ILookup</title>
                <link>http://dev.clojure.org/jira/browse/CLJS-458</link>
                <project id="10040" key="CLJS">ClojureScript</project>
                        <description>&lt;p&gt;(get-in {:a {:b 1}} &lt;span class=&quot;error&quot;&gt;&amp;#91;:a :b :c&amp;#93;&lt;/span&gt; :nothing-there)&lt;/p&gt;

&lt;p&gt;cljs throws exception &quot;Error: No protocol method ILookup.-lookup defined for type number: 1&quot;&lt;br/&gt;
clj returns :nothing-there&lt;/p&gt;

&lt;p&gt;Following snippet contains an additional (satisfies? ILookup m) test to end iteration and return no-value.&lt;br/&gt;
If solution looks ok, I can provide a patch.&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;--------

(defn get-in*
  &quot;Returns the value in a nested associative structure,
  where ks is a sequence of keys. Returns nil &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; the key is not present,
  or the not-found value &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; supplied.&quot;
  {:added &lt;span class=&quot;code-quote&quot;&gt;&quot;1.2&quot;&lt;/span&gt;
   :&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;}
  ([m ks]
     (reduce get m ks))
  ([m ks not-found]
     (loop [sentinel lookup-sentinel
            m m
            ks (seq ks)]
       (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ks
         (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;-not (satisfies? ILookup m)
           not-found
           (let [m (get m (first ks) sentinel)]
             (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (identical? sentinel m)
               not-found
               (recur sentinel m (next ks)))))
         m))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>clojurescript r1552</environment>
            <key id="15964">CLJS-458</key>
            <summary>get-in throws exception when key-list contains key that doesn&apos;t satisfy ILookup</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="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="franks">Frank Siebenlist</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Jan 2013 13:14:39 -0600</created>
                <updated>Sat, 26 Jan 2013 11:15:03 -0600</updated>
                    <resolved>Sat, 26 Jan 2013 11:15:03 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30454" author="dnolen" created="Fri, 18 Jan 2013 15:26:02 -0600"  >&lt;p&gt;Yes patch welcome.&lt;/p&gt;</comment>
                    <comment id="30488" author="dnolen" created="Sat, 26 Jan 2013 11:15:03 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/clojurescript/commit/e8d20229ee87747e3012ac97b5b7006d3703a305&quot;&gt;http://github.com/clojure/clojurescript/commit/e8d20229ee87747e3012ac97b5b7006d3703a305&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>
</channel>
</rss>