wrong default value for ensure-generic-function's :generic-function-class argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Low
|
Unassigned |
Bug Description
(reported by Bruno Haible)
ANSI CL is silent on this, but the MOP's specification of ENSURE-
"The remaining arguments are the complete set of keyword arguments
received by ENSURE-
and the spec of ENSURE-
":GENERIC-
supplied, it defaults to the class named STANDARD-
This is not the case in SBCL. Test case:
(defclass my-generic-function (standard-
()
(:metaclass sb-pcl:
(setf (fdefinition 'foo1)
(ensure-
:generic-
(class-of #'foo1)
; => #<SB-MOP:
(setf (fdefinition 'foo2)
(ensure-
(class-of #'foo2)
Expected: #<SB-MOP:
Got: #<SB-MOP:
As of 1.0.23 this test case behaves a bit differently, getting instead
Cannot CHANGE-CLASS objects into GENERIC-FUNCTION metaobjects.
[Condition of type SB-PCL:
See also:
The Art of the Metaobject Protocol, GENERIC-FUNCTION [:initialization]
on both ENSURE-
is possible to still provoke the original problem.
provoke a sim
description: | updated |
Changed in sbcl: | |
importance: | Undecided → Low |
status: | New → Confirmed |