Skip to content

specs: need new generic-function-method spec type #97

@cgay

Description

@cgay

In the System test suite the spec says:

  open generic-function \= (<date>, <date>) => (<boolean>);

The failure says:

      date-protocol-functions-test failed
        function = argument 0 type {class <object>} is a supertype of the specified
            type {class <date>} failed [expression "subtype?(actual, spec)" evaluates
            to #f, not a true value.]

(The sense of sub/super-type in the error is incorrect but that's not the issue here.)

This is checking the wrong thing. What this spec wants to check is that there is a specific method on = for (<date>, <date>) but what it's actually checking is that the = gf exists and is defined on parameters that are subtypes of <date>.

I propose a new spec:

  generic-function-method \= (<date>, <date>) => (<boolean>);

to do the needful here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureRequires new functionality or documentationspecsRelates to testworks specs

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions