Created
June 20, 2014 10:44
-
-
Save schmir/ca3aebd543811c589068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns sandbox.core) | |
(defprotocol GetUserData | |
"get user data" | |
(getUserData [this] "get user data")) | |
(def d (proxy [Object sandbox.core.GetUserData] [] | |
(getUserData [] 42))) | |
;; sandbox.core=> (getUserData d) | |
;; 42 | |
;; sandbox.core=> (use 'sandbox.core :reload) | |
;; nil | |
;; sandbox.core=> (getUserData d) | |
;; IllegalArgumentException No implementation of method: :getUserData of protocol: #'sandbox.core/GetUserData found for class: sandbox.core.proxy$java.lang.Object$GetUserData$ea9a2492 clojure.core/-cache-protocol-fn (core_deftype.clj:544) | |
;; sandbox.core=> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment