fixed version, uses explicit type name i guess.

(ns err)

(defprotocol P1 (frob-v [this]))
(defprotocol P2 (frob-self [this]))

(deftype Trec [v] P1 (frob-v [] (+ 1 v)))
(println (Trec 0))
(println (frob-v (Trec 0)))

(deftype Trec [v] P1 (frob-v [] (+ 1 v)) P2 (frob-self [] (#'err/Trec (+ 1 v))))
(println (frob-v (Trec 0)))
(println (frob-self (Trec 0)))

-- 
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