Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

absent doesn't work with any-of #211

Open
kkrausse opened this issue Jul 14, 2023 · 1 comment
Open

absent doesn't work with any-of #211

kkrausse opened this issue Jul 14, 2023 · 1 comment

Comments

@kkrausse
Copy link

kkrausse commented Jul 14, 2023

since this works:

(matcher-combinators.standalone/match?
 {:a matcher-combinators.matchers/absent}
 {:c 'd})
;; => true

I would expect that

(matcher-combinators.standalone/match?
 {:a (matcher-combinators.matchers/any-of
      'b
      matcher-combinators.matchers/absent)}
 {:c 'd})
;; => true

also, but actually it gives false.
Using version 3.8.5.

@philomates
Copy link
Collaborator

Hi, yes this seems to be a bug in the implementation.
absent is implemented in a sort of tricky way but I think we can try tracking when an any-of has an absent entry and change the behavior to include the option of an absent match. I'll poke around and see if I can get this rolling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants