The ClojureScript compiler doesn't correctly resolve the namespace of implemented protocol methods when the protocol is referenced via `(:use)`.
E.g.
(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 example works as expected in Clojure.
fixed, http://github.com/clojure/clojurescript/commit/468cf4e1f4bb708b8c7ee114af25c7d66dd41d33
The ClojureScript compiler doesn't correctly resolve the namespace of implemented protocol methods when the protocol is referenced via `(:use)`.
E.g.
(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 example works as expected in Clojure.