summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-10-16 19:09:20 +0000
committerRich Hickey <richhickey@gmail.com>2006-10-16 19:09:20 +0000
commit8cb60ca5a949f8dea94aea80d9c60b1cd336892c (patch)
treedddcb9e90c0a6b5d5eb9170743322f2cf9df9a7c /src
parent348f4fa02df4c2b111be5cc7afd48123fd40d195 (diff)
make invoke use RT.assoc so works on nil
Diffstat (limited to 'src')
-rw-r--r--src/cli/runtime/Keyword.cs2
-rw-r--r--src/jvm/clojure/lang/Keyword.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/runtime/Keyword.cs b/src/cli/runtime/Keyword.cs
index d23ec19e..432b4ac6 100644
--- a/src/cli/runtime/Keyword.cs
+++ b/src/cli/runtime/Keyword.cs
@@ -25,7 +25,7 @@ internal Keyword(String name):base(name) { } public Object invoke() /*throws
if (obj == null)
return null;
return ((IPersistentMap)obj).get(this); } /** * Indexer implements IFn for attr access * This two arg version is the setter * @param tld * @param obj - must be AMap * @param val * @return val */ public Object invoke( Object obj, Object val) /*throws Exception*/ {
- return ((IPersistentMap)obj).assoc(this, val); }
+ return RT.assoc(this, val,obj); }
public Object invoke(Object arg1, Object arg2, Object arg3)
{
diff --git a/src/jvm/clojure/lang/Keyword.java b/src/jvm/clojure/lang/Keyword.java
index 20f58d55..50c44b6f 100644
--- a/src/jvm/clojure/lang/Keyword.java
+++ b/src/jvm/clojure/lang/Keyword.java
@@ -54,7 +54,7 @@ public Object invoke(Object obj) throws Exception {
* @throws Exception
*/
public Object invoke(Object obj, Object val) throws Exception {
- return ((IPersistentMap) obj).assoc(this, val);
+ return RT.assoc(this, val, obj);
}
public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception {