Clojure

[spec] describe* of spec-impl returns nil :args and :fn

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.10
  • Fix Version/s: Release 1.11
  • Component/s: None
  • Labels:
  • Patch:
    Code
  • Approval:
    Vetted

Description

The form of an empty fspec returns nil at :args and :fn:

(s/form (s/fspec))
=> (clojure.spec.alpha/fspec :args nil :ret clojure.core/any? :fn nil)

The problem is, that the specs from CLJ-2112 don't validate that form. I suggest to implement describe* of fspec-impl like that of map-spec-impl which omits nil values.

Patch: clj-2368.patch

Activity

Hide
Alex Miller added a comment -

Sounds right.

Show
Alex Miller added a comment - Sounds right.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: