Opened 6 years ago

Last modified 18 months ago

#239 assigned defect

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

Reported by: rschlatte Owned by: rschlatte
Priority: minor Milestone: 1.6.0
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.

Subtickets (add)

Attachments (1)

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

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by rschlatte

defgeneric generic-function-class warning patch

comment:1 Changed 6 years ago by rschlatte

  • Component changed from (A)MOP to CLOS
  • Owner changed from ehuelsmann to somebody

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

comment:2 Changed 6 years ago by mevenson

  • Milestone set to 1.2.0
  • Version set to 1.2.0-dev

comment:3 Changed 6 years ago by https://www.google.com/accounts/o8/id?id=AItOawkYnNNEAO_K40Gp0xROhyjOPgjvIskQ48M

  • Owner changed from somebody to rschlatte
  • Status changed from new to assigned

comment:4 Changed 5 years ago by https://www.google.com/accounts/o8/id?id=AItOawkYnNNEAO_K40Gp0xROhyjOPgjvIskQ48M

  • Milestone changed from 1.2.0 to 1.3.0

comment:5 Changed 5 years ago by mevenson

  • Summary changed from defgeneric with unsuitable :generic-function-class gives incomprehensible error to DEFGENERIC with unsuitable :generic-function-class gives incomprehensible error

comment:6 Changed 5 years ago by mevenson

  • Milestone changed from 1.3.0 to 2.0

Ticket retargeted after milestone closed

comment:7 Changed 5 years ago by mevenson

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

comment:8 Changed 5 years ago by mevenson

  • Milestone changed from 2.0.0 to 1.4.0

comment:9 Changed 2 years ago by mevenson

  • Milestone changed from 1.4.0 to 1.5.0

Ticket retargeted after milestone closed

comment:10 Changed 18 months ago by mevenson

  • Milestone changed from 1.5.0 to 1.6.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.