juji-io / editscript

A library to diff and patch Clojure/ClojureScript data structures
Eclipse Public License 1.0
472 stars 23 forks source link

Unable to resolve symbol: ->EditScript #3

Closed miner closed 6 years ago

miner commented 6 years ago

I think the problem is that the ->EditScript function is not defined until after the deftype so it can't be used within the deftype body. You need to use the inter-op dot notation "EditScript."

Here's what I saw:

$ lein test Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: ->EditScript in this context, compiling:(editscript/edit.cljc:146:5)

My fix is this small diff...

diff --git a/src/editscript/edit.cljc b/src/editscript/edit.cljc index da9666e..f79b60e 100644 --- a/src/editscript/edit.cljc +++ b/src/editscript/edit.cljc @@ -143,7 +143,7 @@

IEditScript (combine [this that]

huahaiy commented 6 years ago

Fixed. Thanks.