Opened 12 years ago

Closed 11 years ago

#83 closed enhancement (fixed)

problem with error reporting on undefined class during make instance

Reported by: ehuelsmann Owned by: Mahmud Mohamed
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

Attachments (2)

make-instance-unfinalized-class.patch.patch (575 bytes) - added by Mahmud Mohamed 11 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 11 years ago.
Alternative solution, adding to MAKE-INSTANCE instead

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by Mahmud Mohamed

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

comment:1 Changed 11 years ago by Mahmud Mohamed

Owner: changed from somebody to Mahmud Mohamed
Status: newaccepted
Type: defectenhancement

comment:2 Changed 11 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 11 years ago by ehuelsmann

Alternative solution, adding to MAKE-INSTANCE instead

comment:3 Changed 11 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 11 years ago by ehuelsmann

Milestone: 0.24

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

comment:5 Changed 11 years ago by ehuelsmann

Resolution: fixed
Status: acceptedclosed

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

Note: See TracTickets for help on using tickets.