VALUES type specifier incorrectly accepts *

Bug #736418 reported by Jean-Philippe Paradis on 2011-03-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

What I do:
(the (values *) 'anything) => ANYTHING

What happens:
No condition of any kind is signaled.

What I expected to happen:
From CLHS for Type Specifier VALUES:

"The symbol * may not be among the value-types."

So I think signaling an error at compile-time would be appropriate and convenient. This may or may not break unknowingly faulty code out there?...

By the way, I'm aware that this is in the realm of "undefined behavior", not the realm of "the standard says an error must be signaled".

SBCL version: 1.0.42
uname -a: Linux dynamorph 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux


Changed in sbcl:
importance: Undecided → Low
status: New → Triaged
tags: added: ansi types
Changed in sbcl:
assignee: nobody → Roman Marynchak (roman-marynchak)
status: Triaged → In Progress

I consider this patch to be a KLUDGE, because the right solution is to prohibit * as a type specifier. However, this involves more issues to be fixed first:

1. (the * 6) -> 6, wrong.
2. (subtypep '* 't) is confused: "VALUES type illegal in this context".
3. sb-kernel::valid-type-specifier-p recognizes * to be a type specifier.

and maybe more?

As for now, let us fix the original issue, and then we should discuss the remaining ones.

tags: added: review
Changed in sbcl:
assignee: Roman Marynchak (roman-marynchak) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers