VALUES type specifier incorrectly accepts *
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
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
*features*:
(:SWANK :QUICKLISP :SB-BSD-
:SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL
:SB-SOURCE-
:LARGEFILE :GENCGC :STACK-
:COMPARE-
:STACK-
:STACK-
:CYCLE-COUNTER :INLINE-CONSTANTS :MEMORY-
:OS-PROVIDES-
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 |
Changed in sbcl: | |
status: | Confirmed → Fix Released |
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. :valid- type-specifier- p recognizes * to be a type specifier.
2. (subtypep '* 't) is confused: "VALUES type illegal in this context".
3. sb-kernel:
and maybe more?
As for now, let us fix the original issue, and then we should discuss the remaining ones.