目前,如果您在由(bean)生成的代理上运行clojure.walk函数,则会抛出异常
(clojure.walk/prewalk identity (bean (java.util.Date.)))
(link: java) ERROR in (test-walk-bean) (:-1)
(link: java) expected: (clojure.walk/prewalk identity b)
(link: java) actual: java.lang.UnsupportedOperationException: empty
(link: java) at clojure.core.proxy$clojure.lang.APersistentMap$ff19274a.empty (:-1)
(link: java) clojure.core$empty.invokeStatic (core.clj:5202)
(link: java) clojure.walk$walk.invokeStatic (walk.clj:49)
(link: java) clojure.walk$prewalk.invokeStatic (walk.clj:64)
(link: java) clojure.walk$prewalk.invoke (walk.clj:60)
(link: java) clojure.lang.AFn.applyToHelper (AFn.java:156)
(link: java) clojure.lang.AFn.applyTo (AFn.java:144)
(link: java) clojure.core$apply.invokeStatic (core.clj:657)
因为代理没有实现empty,这是clojure.walk所需的。此补丁添加了一个用于复制的测试和一个修复。