DEFTYPE does not care about the second argument kind
Bug #576594 reported by
Roman Marynchak
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
SBCL | Status tracked in Trunk | |||||
Trunk |
Fix Released
|
Low
|
Unassigned |
Bug Description
DEFTYPE in SBCL accepts a wide range of garbage to be its second argument, instead of checking it to be a valid lambda-list, as defined by CLHS.
For example:
* (deftype rr yy)
; in: LAMBDA NIL
; (LET* ((YY (CDR #:WHOLE676)))
; (BLOCK RR))
;
; caught STYLE-WARNING:
; The variable YY is defined but never used.
;
; compilation unit finished
; caught 1 STYLE-WARNING condition
Regards,
Roman
Changed in sbcl: | |
status: | New → In Progress |
assignee: | nobody → Roman Marynchak (roman-marynchak) |
Changed in sbcl: | |
importance: | Undecided → Low |
tags: | added: review |
To post a comment you must log in.
I have attached the simple patch. Now the behavior is the next:
* (deftype rr yy)
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING
{A9EB801} >:
Arguments list is not a valid lambda-list: YY
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly- abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
((LAMBDA (#:WHOLE6 #:ENVIRONMENT7)) (DEFTYPE RR YY) #<unavailable argument>)
0]
Also I have fixed another error message to be a valid English sentence.
Regards,
Roman