*assert*

dynamic varsince v1.7.10Edit

Internally used to remove all calls to assert when the compiler option :elide-asserts is set to true. Not to be used manually.


Details:

This variable cannot be set at runtime in JVM ClojureScript, but can be in self-hosted ClojureScript.


Examples:

The following only works in self-hosted ClojureScript:

(assert (= 1 2))
;; Error: Assert failed: false

(set! *assert* false)
(assert (= 1 2))
;;=> nil

See Also:


Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(def
  ^{:dynamic true}
  *assert* true)