Hi,
Compiling the following code throws an exception as below. I looked at
compiler.clj and don't understand the reason for this error. I am not
sure what a "local var" is and I would think "x" would be a field
which should be settable. Are mutable deftype fields not supported in
ClojureScript?
(defprotocol foo-p (bar [this]))
(deftype foo [^{:volatile-mutable true} x]
foo-p
(bar [this] (set! x nil)))
Exception in thread "main" java.lang.RuntimeException:
java.lang.AssertionError: Assert failed: Can't set! local var
(nil? (-> env :locals target))
at clojure.lang.Util.runtimeException(Util.java:153)
at clojure.lang.Compiler.eval(Compiler.java:6417)
....
Thanks,
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en