Permalink
Browse files

CLJ-977 (int \a) returns a value, (long \a) throws an exception

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
1 parent 9baebd0 commit e84c136b96cca02f5766568a05b41f6da45f76f1 @scottlowe scottlowe committed with stuarthalloway May 13, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/jvm/clojure/lang/RT.java
@@ -1134,6 +1134,8 @@ else if (x instanceof Byte || x instanceof Short)
return ((Number) x).longValue();
else if (x instanceof Ratio)
return longCast(((Ratio)x).bigIntegerValue());
+ else if (x instanceof Character)
+ return longCast(((Character) x).charValue());
else
return longCast(((Number)x).doubleValue());
}

0 comments on commit e84c136

Please sign in to comment.