You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attaching multiple specs to the same symbol is forbidden by u.s and made impossible by the Clojure reader (for some cases; but I don't want to create a pattern that works sometimes)
Rationale: in ^String ^Object x will be read as ^{:tag String} ^{:tag Object} x. Given the identical key name (:tag), either annotation will be silently dropped.
Adding that second spec needs a {:pre [(check! ...)]}, which is cumbersome.
Task
Implement a ^{::speced/specs [::spec1 ::spec2]} 'syntax' (directive), analog to the existing ^{::speced/spec ::a-single-spec} one.
Thoughts
I think this feature would shine (vs. the existing ^{::speced/spec ::spec}) if it accepted class names that would expand to type hints as usual: ^{::speced/specs [SomeClass ::spec2]}, also ^{::speced/specs [string? ::spec2]}.
Else the feature would be only marginally better than a vanilla (s/and ...)
Acceptance criteria
it is validated that specs is a vector with a positive count.
specs are ANDed.
The text was updated successfully, but these errors were encountered:
Context
Attaching multiple specs to the same symbol is forbidden by u.s and made impossible by the Clojure reader (for some cases; but I don't want to create a pattern that works sometimes)
Adding that second spec needs a
{:pre [(check! ...)]}
, which is cumbersome.Task
Implement a
^{::speced/specs [::spec1 ::spec2]}
'syntax' (directive), analog to the existing ^{::speced/spec ::a-single-spec} one.Thoughts
I think this feature would shine (vs. the existing
^{::speced/spec ::spec}
) if it accepted class names that would expand to type hints as usual:^{::speced/specs [SomeClass ::spec2]}
, also^{::speced/specs [string? ::spec2]}
.Else the feature would be only marginally better than a vanilla
(s/and ...)
Acceptance criteria
specs
is a vector with a positive count.The text was updated successfully, but these errors were encountered: