Hello,
I'm not sure if what I'm doing is supported or whether I'm doing it
incorrectly.
I have two ClojureScript namespaces:
(ns foo)
(defprotocol SomeProtocol
(some-function [this]))
(ns bar
(:use [foo :only (SomeProtocol)]))
(defrecord SomeRecord
SomeProtocol
(some-function [_] :quux))
The protocol function is compiled as though SomeProtocol was defined in the
"bar" namespace, e.g.:
bar.SomeType.prototype.bar$SomeProtocol$ = true;
bar.SomeType.prototype.bar$SomeProtocol$some_function = function(this$) {
var this__14211 = this;
return"\ufdd0'quux"
};
This causes an error at runtime.
Should I be able to do this, or should I stick with (:require foo) and
foo/SomeProtocol?
Cheers,
Stuart
--
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