Opened 10 years ago
Closed 10 years ago
#866 closed defect (invalid)
boa constructor supplied-p argument
Reported by: | rme | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Compiler | Version: | trunk |
Keywords: | Cc: |
Description
From pro@…:
I tried to save a supplied-p parameter from a BOA constructor like this:
(defstruct (delayed-iseq (:constructor iseq (start-or-end &optional (end 0 end?) (by 1) strict-direction?))) "Delayed index sequence evaluation." start-or-end end end? by strict-direction?)
but SBCL complained that end? was not used. After rereading the CLHS page for defstruct, I am still not 100% sure why this is. My intepretation is that END? is an argument like any other, but probably I am not getting something.
Change History (1)
comment:1 Changed 10 years ago by gb
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
SBCL's behavior in this case isn't very interesting, but it happens to be correct (as does CCL's, Allegro's, ...)
Supplied-p variables in BOA constructor lambda lists aren't matched against slot names, but they can be used to provide default values for lambda-list variables that do match slot names.
See section 3.4.6 of CLHS.