Skip to content
Browse files

* src/clj/cljs/compiler.clj: improve bool inference

  • Loading branch information...
1 parent 129b0ab commit de72ace29a7cf4af3691896e96cb587daee4949c David Nolen committed May 4, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/clj/cljs/compiler.clj
View
4 src/clj/cljs/compiler.clj
@@ -407,6 +407,10 @@
else-tag (infer-tag (:else e))]
(when (= then-tag else-tag)
then-tag))
+ :constant (case (:form e)
+ true 'boolean
+ false 'boolean
+ nil)
nil)))
(defn safe-test? [e]

0 comments on commit de72ace

Please sign in to comment.
Something went wrong with that request. Please try again.