Skip to content

even?, odd?, maybe others are underspec'd #70

@stanislowskij

Description

@stanislowskij

The current specs state that the argument should only be a number, not strictly an integer. This gives us a default error instead, which also has a misleading Babel message:

(s/fdef clojure.core/even?
  :args :babel.args/one-number)
(stest/instrument `clojure.core/even?)

after running (setup-exc):

babel.middleware=> (even? 1.2)
Expected an integer number, but a sequence 1.2 was given instead.

TODO: Find other cases

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomersneeds explorationNeed to find more specific examples and narrow down the issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions