We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90497c1 commit b24c036Copy full SHA for b24c036
2 files changed
src/main/clojure/cljs/compiler.cljc
@@ -335,6 +335,9 @@
335
(not (js/isFinite x))
336
(emits (if (pos? x) "Infinity" "-Infinity"))
337
338
+ (and (zero? x) (neg? (/ x)))
339
+ (emits "(-0)")
340
+
341
:else (emits "(" x ")"))))
342
343
#?(:clj
src/test/cljs/cljs/primitives_test.cljs
@@ -953,6 +953,10 @@
953
(is (= 1 (gobject/get #js {:a 1} "a")))
954
(is (= 1 (.-a #js {:a 1})))))
955
956
+(deftest test-3352
957
+ (is (== ##-Inf (/ -0.0)))
958
+ (is (== ##Inf (/ -0))))
959
960
(deftest test-char?
961
(is (char? "0"))
962
(is (char? (String/fromCharCode 13)))
0 commit comments