Skip to content

Instantly share code, notes, and snippets.

@slagyr
Created October 20, 2011 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save slagyr/1301638 to your computer and use it in GitHub Desktop.
Save slagyr/1301638 to your computer and use it in GitHub Desktop.
Clojure 1.3 bug output
REPL started; server listening on localhost:32980.
(defmacro with []
(let [var-name (with-meta 'something {:dynamic true})]
`(do
(let [with-component# (atom 42)]
(declare ~var-name)
with-component#))))
#'user/with
(list
(def _with_ (with))
(def _example_ (fn [] @something))
)
(with-bindings {#'something _with_}
(_example_)
(#'user/_with_ #'user/_example_)
user=> user=> )
ClassCastException clojure.lang.Var$Unbound cannot be cast to clojure.lang.IDeref clojure.core/deref (core.clj:2078)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment