Opened 8 years ago

Closed 7 years ago

#83 closed enhancement (fixed)

problem with error reporting on undefined class during make instance

Reported by: ehuelsmann Owned by: mmohamed
Priority: major Milestone: 0.24
Component: CLOS Version:
Keywords: Cc:
Parent Tickets:

Description

CL-USER(25): (defclass c (d) ((q :initarg :q)))
#<STANDARD-CLASS C {B5BEE0}>

CL-USER(26): (make-instance 'c :q t)
Debugger invoked on condition of type PROGRAM-ERROR:

Invalid initarg :Q.

The error should say instead something about d not being defined.

This in build of a freshly updated trunk abcl

Subtickets

Attachments (2)

make-instance-unfinalized-class.patch.patch (575 bytes) - added by mmohamed 7 years ago.
Patch to signal an error if make-instance applied to a class with unfinalized precendence list
make-instance-unfinalized-class.patch (564 bytes) - added by ehuelsmann 7 years ago.
Alternative solution, adding to MAKE-INSTANCE instead

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by mmohamed

Patch to signal an error if make-instance applied to a class with unfinalized precendence list

comment:1 Changed 7 years ago by mmohamed

  • Owner changed from somebody to mmohamed
  • Status changed from new to accepted
  • Type changed from defect to enhancement

comment:2 Changed 7 years ago by ehuelsmann

mmohamed, thanks for the patch, unfortunately, it completely disables the possibility (supported by CLHS) to forward-reference classes like this:

(defclass b (a) ())

(defclass a () ())

(make-instance 'b)

I'm affraid the patch isn't quite good enough. Thank you very much for the effort though, it's really much appreciated.

Changed 7 years ago by ehuelsmann

Alternative solution, adding to MAKE-INSTANCE instead

comment:3 Changed 7 years ago by ehuelsmann

mmohamed, I'm thinking along the lines of the patch I just attached, but that's not good enough, because it doesn't say there's a forward-referenced class involved.

comment:4 Changed 7 years ago by ehuelsmann

  • Milestone set to 0.24

With the prototype patch, this ticket should be doable in the relatively short term.

comment:5 Changed 7 years ago by ehuelsmann

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in r13217: the error is now about finalizing a FORWARD-REFERENCED-CLASS being impossible.

Note: See TracTickets for help on using tickets.