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

nesting multiple non-dynamic specs containing dynamic spec fails #20

Open
meeseekz opened this issue Jan 30, 2020 · 0 comments · May be fixed by #21
Open

nesting multiple non-dynamic specs containing dynamic spec fails #20

meeseekz opened this issue Jan 30, 2020 · 0 comments · May be fixed by #21

Comments

@meeseekz
Copy link

This works (spec (vector* ubyte)) but adding another spec layer breaks it: (spec (spec (vector* ubyte)))

Exception: java.lang.IllegalArgumentException: No implementation of method: :size of protocol: #'octet.spec/ISpecSize found for class: octet.spec.collections$vector_STAR_$reify__5878

A quick fix seems to be changing the propagation of size to prioritize size* when available:

(if (satisfies? ISpecSize type)

@meeseekz meeseekz linked a pull request Jan 30, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant