DEFINE-CONDITION slot option :ALLOCATION :CLASS "almost" works
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The macro accidentally omits the :allocation initarg from MAKE-CONDITION-
* (define-condition crash () ((count :accessor crash-count :initform 0 :allocation :class)))
CRASH
* (describe(
#<CRASH {1076CB6583}>
[condition]
Slots with :INSTANCE allocation:
COUNT = 0
It's a trivial fix though as the internals are apparently in good working order.
diff --git a/src/code/
index ab6e942..e854e8e 100644
--- a/src/code/
+++ b/src/code/
@@ -533,6 +533,7 @@
(slots `(make-
+ :allocation ',allocation
Afterward:
* (progn (loop repeat 5 do (incf (crash-count (make-condition 'crash)))) (describe(
#<CRASH {1002E38763}>
[condition]
Slots with :CLASS allocation:
COUNT = 5
* (lisp-implement
"1.0.58.
Incidentally, the docstring says that WITH-SLOTS and SLOT-VALUE may not be used, but they seem to work.
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Fixed by patch attached to https:/ /bugs.launchpad .net/sbcl/ +bug/1164969.