diff --git a/src/com/rpl/specter/prot_opt_invoke.clj b/src/com/rpl/specter/prot_opt_invoke.clj index cb6a6e7..7172be6 100644 --- a/src/com/rpl/specter/prot_opt_invoke.clj +++ b/src/com/rpl/specter/prot_opt_invoke.clj @@ -1,10 +1,11 @@ (ns com.rpl.specter.prot-opt-invoke) (defmacro mk-optimized-invocation [protocol obj method num-args] - (let [args (take num-args (repeatedly gensym))] + (let [args (take num-args (repeatedly gensym)) + o (-> (gensym) (with-meta {:tag 'not-native}))] `(if (~'implements? ~protocol ~obj) - (fn [^not-native o# ~@args] - (~method o# ~@args) + (fn [~o ~@args] + (~method ~o ~@args) ) ~method ))) \ No newline at end of file