Skip to content

Commit 4c50d43

Browse files
favilaswannodette
authored andcommitted
CLJS-1178: Compiler does not know Math ns is not not-native
Math functions with static-fns true compilation modes would emit arity checks or use .call() for invocation. Now they use direct invocation.
1 parent 4773730 commit 4c50d43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/clj/cljs/compiler.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@
759759
opt-not? (and (= (:name info) 'cljs.core/not)
760760
(= (ana/infer-tag env (first (:args expr))) 'boolean))
761761
ns (:ns info)
762-
js? (= ns 'js)
762+
js? (or (= ns 'js) (= ns 'Math))
763763
goog? (when ns
764764
(or (= ns 'goog)
765765
(when-let [ns-str (str ns)]

0 commit comments

Comments
 (0)