Just isn't supported. Patch welcome :)

David

On Wed, Jul 1, 2015 at 3:46 PM, Alan Thompson <clooj...@gmail.com> wrote:

> Hi - I am trying to write some unit tests for Datomic using core.match to
> keep things succinct.  I was hoping to use a match pattern like this:
>
>     [ {:e tx-eid  :a :db/txInstant        :v _              :tx tx-eid
> :added true}
>       {:e _       :a :community/category  :v "free stuff"   :tx tx-eid
> :added false} ]
>
> to show that the transaction EID (tx-eid) shows up in 3 places in the
> datoms result of a transaction.  However, I am getting the error:
>
> Exception in thread "main" java.lang.AssertionError: Pattern row 1:
> Pattern row reuses wildcards in [[{:e tx-eid, :a :db/txInstant, :v _, :tx
> tx-eid, :added true} {:e _, :a :community/category, :v "free stuff", :tx
> tx-eid, :added false}]].  The following wildcards are ambiguous: tx-eid.
> There's no guarantee that the matched values will be same.  Rename the
> occurrences uniquely.,
>
>
> So I am apparently unable to use core.match in the way I was hoping.  Are
> there any workarounds to this problem?
>
> Thanks,
> Alan
>
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to