defsetf不能定义last与nthcdr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
在windows系统中:
在clozure common lisp中:?(defsetf nthcdr (index lst)(ele)
在clisp中:(defsetf nthcdr (index lst)(ele)
在steel bank common lisp中:(defsetf nthcdr (index lst)(ele)
; in: DEFSETF NTHCDR
; (LAMBDA (INDEX LST) (BLOCK NTHCDR 1))
; ==>
; #'(LAMBDA (INDEX LST) (BLOCK NTHCDR 1))
;
; caught STYLE-WARNING:
; The variable INDEX is defined but never used.
;
; caught STYLE-WARNING:
; The variable LST is defined but never used.
; (SB-INT:
; (#:SUBFORMS #:ENV ELE)
; (DECLARE (SB-C::LAMBDA-LIST (INDEX LST)))
; (DECLARE (IGNORE #:ENV))
; (APPLY (LAMBDA (INDEX LST) (BLOCK NTHCDR 1)) #:SUBFORMS))
;
; caught STYLE-WARNING:
; The variable ELE is defined but never used.
;
; compilation unit finished
; caught 3 STYLE-WARNING conditions
debugger invoked on a SYMBOL-
#<THREAD "main thread" RUNNING {23D30061}>:
Lock on package COMMON-LISP violated when defining a setf-expander for NTHCDR
while in package COMMON-LISP-USER.
See also:
The SBCL Manual, Node "Package Locks"
The ANSI Standard, Section 11.1.2.1.2
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [CONTINUE ] Ignore the package lock.
1: [IGNORE-ALL ] Ignore all package locks in the context of this operation.
2: [UNLOCK-PACKAGE] Unlock the package.
3: [ABORT ] Exit debugger, returning to top level.
(PACKAGE-
"defining a setf-expander for ~A" :FORMAT-ARGUMENTS (NTHCDR))
status invalid
done
Hi,
liushizhi <email address hidden> writes:
> See also:
> The SBCL Manual, Node "Package Locks"
> The ANSI Standard, Section 11.1.2.1.2
The reason that this is an error in SBCL is documented in these sections
of the manual and the CL standard.
Christophe