Skip to content

Commit

Permalink
* src/clj/cljs/core.clj: nil? needs to use coercive-not=, we need to …
Browse files Browse the repository at this point in the history
…handle undefined
  • Loading branch information
David Nolen authored and David Nolen committed May 3, 2012
1 parent 53bcb8b commit 2cd15f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/clj/cljs/core.clj
Expand Up @@ -52,7 +52,7 @@
(vary-meta e assoc :tag 'boolean))

(defmacro nil? [x]
`(identical? ~x nil))
`(coercive-= ~x nil))

;; internal - do not use.
(defmacro coercive-not= [x y]
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/cljs/core.cljs
Expand Up @@ -281,7 +281,7 @@
(defn ^boolean nil?
"Returns true if x is nil, false otherwise."
[x]
(identical? x nil))
(coercive-= x nil))

(defn type [x]
(if (or (nil? x) (undefined? x))
Expand Down

0 comments on commit 2cd15f8

Please sign in to comment.