Check should specize function specs before checking

Description

This code works fine in 1.9.0-alpha12:

But if we factor the fspec out into its own keyword:

The check fails with the exception:

The check function doesn't seem to be resolving ::inc, when presumably it should.

Patch: clj-2024-2.patch

Environment

None

Activity

Show:
Rich Hickey
October 28, 2016, 1:44 PM

this should be fixed in fspec, not its use by test

Alex Miller
October 28, 2016, 2:23 PM

fspec is not the problem as far as I can tell - it is already making specs of its args.

The problem is that f is registered as an alias of ::inc. I don't think you want to resolve that at registration time (as ::inc might not exist yet).

The problem as far as I understand it is that at the time of use (by check), f is not resolved to it's final spec and that's what the patch does.

Alex Miller
October 28, 2016, 2:43 PM

Added new patch that uses `spec` instead of private `specize` function.

Completed

Assignee

Unassigned

Reporter

import

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Priority

Major
Configure