当前如果在 (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 所必需的。此补丁添加了一个重现问题的测试和一个修复。