DEFCLASS :METACLASS STRUCTURE-CLASS gives STLE-WARNINGS for function redefinitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Low
|
Unassigned |
Bug Description
(reported by Alexey Dejneka sbcl-devel 2002-08-04)
DEFCLASS does not inform the compiler about generated
functions. Compiling a file with
(DEFCLASS A-CLASS ()
(DEFUN A-CLASS-X (A)
used to result in a STYLE-WARNING:
APD's fix for this was checked in to sbcl-0.7.6.20, but Pierre
Mai points out that the declamation of functions is in fact
incorrect in some cases (most notably for structure
classes). This means that at present erroneous attempts to use
WITH-SLOTS and the like on classes with metaclass STRUCTURE-CLASS
won't get the corresponding STYLE-WARNING.
[much later, in 2006-08] in fact it's no longer erroneous to use
WITH-SLOTS on structure-classes. However, including :METACLASS
STRUCTURE-CLASS in the class definition gives a whole bunch of
function redefinition warnings, so we're still not good to close
this bug:
CL-USER> (defclass myf () (x y z) (:metaclass structure-class))
STYLE-WARNING: redefining |MYF structure class constructor| in DEFUN
STYLE-WARNING:
redefining (SB-PCL:
STYLE-WARNING:
redefining (SB-PCL:
STYLE-WARNING:
redefining (SB-PCL:
STYLE-WARNING:
redefining (SB-PCL:
STYLE-WARNING:
redefining (SB-PCL:
STYLE-WARNING:
redefining (SB-PCL:
#<STRUCTURE-CLASS MYF>
description: | updated |
Changed in sbcl: | |
importance: | Undecided → Low |
status: | New → Confirmed |