It does. Ticket opened: http://dev.clojure.org/jira/browse/CLJS-216

Cheers,
Stuart

On 28 April 2012 01:30, David Nolen <dnolen.li...@gmail.com> wrote:

> Does this work in Clojure? If so file a ticket in JIRA.
>
> David
>
> On Fri, Apr 27, 2012 at 5:09 AM, Stuart Campbell <stu...@harto.org> wrote:
>
>> 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 clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to