alex-gutev / cl-form-types

Library for determining the types of Common Lisp forms based on information stored in the environment.
MIT License
19 stars 1 forks source link

Values types should not be combined with `NIL` #6

Closed digikar99 closed 2 years ago

digikar99 commented 2 years ago

Essentially:

CL-USER> (cl-form-types:form-type '(the string (values "" 1.0)) nil)
(VALUES (AND STRING (SIMPLE-ARRAY CHARACTER (0))) (AND NIL (EQL 1.0)))

The second values-type should be just (EQL 1.0) or (AND T (EQL 1.0) rather than (AND NIL (EQL 1.0)).

alex-gutev commented 2 years ago

I see, I missed this part of the hyperspec: "It is permissible for form to yield a different number of values than are specified by value-type".

alex-gutev commented 2 years ago

Fixed in d0c57a6.