File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 885
885
(-hash ^not-native o)
886
886
887
887
(number? o)
888
- (js-mod (Math/floor o) 2147483647 )
888
+ (if (js/isFinite o)
889
+ (js-mod (Math/floor o) 2147483647 )
890
+ (case o
891
+ Infinity
892
+ 2146435072
893
+ -Infinity
894
+ -1048576
895
+ 2146959360 ))
889
896
890
897
(true ? o) 1
891
898
Original file line number Diff line number Diff line change 3125
3125
(-lookup [o k not-found] :3-arity ))
3126
3126
[:foo ]))))
3127
3127
3128
+ (deftest test-cljs-1594
3129
+ (is (not (js/isNaN (hash Infinity))))
3130
+ (is (not (js/isNaN (hash -Infinity))))
3131
+ (is (not (js/isNaN (hash NaN))))
3132
+ (is (= (hash-set Infinity -Infinity 0 1 2 3 4 5 6 7 8 )
3133
+ (set (keys (zipmap [Infinity -Infinity 0 1 2 3 4 5 6 7 8 ] (repeat nil )))))))
3128
3134
3129
3135
(comment
3130
3136
; ; ObjMap
You can’t perform that action at this time.
0 commit comments