Previously, DEFINE-CONDITION failed to pass the :ALLOCATION slot
option to MAKE-CONDITION-SLOT.
A test case has been added.
fixes lp#1049404
;;;; -*- coding: utf-8; fill-column: 78 -*-
changes relative to sbcl-1.1.6
+ * bug fix: :allocation slot option works for condition slots
+ (lp#1049404)
* bug fix: redefining conditions does not lead to multiple evaluations of
hairy slot initfunctions anymore (lp#1164969)
* bug fix: CLASS-DIRECT-DEFAULT-INITARGS now works for condition classes
:initform-p ',initform-p
:documentation ',documentation
:initform ,(when initform-p
- `#'(lambda () ,initform)))))))
+ `#'(lambda () ,initform))
+ :allocation ',allocation)))))
(dolist (option options)
(unless (consp option)
(test :compile+make-instance
(make-instance
'condition-with-non-constant-default-initarg))))
+
+;;; bug-1049404
+
+(define-condition condition-with-class-allocation ()
+ ((count :accessor condition-with-class-allocation-count
+ :initform 0
+ :allocation :class)))
+
+(with-test (:name (:condition-with-class-allocation :bug-1049404))
+ (loop repeat 5 do
+ (incf (condition-with-class-allocation-count
+ (make-condition 'condition-with-class-allocation))))
+ (assert (= 5 (condition-with-class-allocation-count
+ (make-condition 'condition-with-class-allocation)))))