Opened 9 years ago

Last modified 6 months ago

#239 assigned defect

DEFGENERIC with unsuitable :generic-function-class gives incomprehensible error

Reported by: rschlatte Owned by: rschlatte
Priority: minor Milestone: 1.8.1
Component: CLOS Version: 1.2.0-dev
Keywords: Cc:
Parent Tickets:

Description

Compiling and loading the following (incorrect) file gives an error saying that foo-generic-function is not of type standard-generic-function. The real error is that foo-generic-function must be defined with (:metaclass funcallable-standard-class) to be suitable as a generic function class.

(require :clos)

(defclass foo-generic-function (standard-generic-function))

(defgeneric goo (a b)
  (:generic-function-class foo-generic-function)
  (:method (a b)
    (princ "default method")))

(print #'goo)

The attached patch would emit a full warning in defgeneric, but currently find-class does not implement correct behavior when called with 3 parameters.

Attachments (1)

defgeneric-patch.patch (2.1 KB) - added by rschlatte 9 years ago.
defgeneric generic-function-class warning patch

Download all attachments as: .zip

Change History (18)

Changed 9 years ago by rschlatte

Attachment: defgeneric-patch.patch added

defgeneric generic-function-class warning patch

comment:1 Changed 9 years ago by rschlatte

Component: (A)MOPCLOS
Owner: changed from ehuelsmann to somebody

See #240 for the bug blocking the fix for this one.

comment:2 Changed 8 years ago by Mark Evenson

Milestone: 1.2.0
Version: 1.2.0-dev

comment:3 Changed 8 years ago by Evenson Not Org

Owner: changed from somebody to rschlatte
Status: newassigned

comment:4 Changed 8 years ago by Evenson Not Org

Milestone: 1.2.01.3.0

comment:5 Changed 7 years ago by Mark Evenson

Summary: defgeneric with unsuitable :generic-function-class gives incomprehensible errorDEFGENERIC with unsuitable :generic-function-class gives incomprehensible error

comment:6 Changed 7 years ago by Mark Evenson

Milestone: 1.3.02.0

Ticket retargeted after milestone closed

comment:7 Changed 7 years ago by Mark Evenson

Milestone: 2.02.0.0

Milestone renamed

comment:8 Changed 7 years ago by Mark Evenson

Milestone: 2.0.01.4.0

comment:9 Changed 5 years ago by Mark Evenson

Milestone: 1.4.01.5.0

Ticket retargeted after milestone closed

comment:10 Changed 4 years ago by Mark Evenson

Milestone: 1.5.01.6.0

Ticket retargeted after milestone closed

comment:11 Changed 18 months ago by Mark Evenson

Milestone: 1.6.01.6.1

Ticket retargeted after milestone closed

comment:12 Changed 13 months ago by Mark Evenson

Milestone: 1.6.11.6.2

Ticket retargeted after milestone closed

comment:13 Changed 11 months ago by Mark Evenson

Milestone: 1.6.21.7.0

comment:14 Changed 11 months ago by Mark Evenson

Milestone: 1.7.01.7.1

Ticket retargeted after milestone closed

comment:15 Changed 10 months ago by Mark Evenson

Milestone: 1.7.11.7.2

Ticket retargeted after milestone closed

comment:16 Changed 8 months ago by Mark Evenson

Milestone: 1.7.21.8.0

Milestone renamed

comment:17 Changed 6 months ago by Mark Evenson

Milestone: 1.8.01.8.1

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.