Opened 15 years ago
Closed 14 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)
Change History (7)
Changed 14 years ago by
Attachment: | make-instance-unfinalized-class.patch.patch added |
---|
comment:1 Changed 14 years ago by
Owner: | changed from somebody to Mahmud Mohamed |
---|---|
Status: | new → accepted |
Type: | defect → enhancement |
comment:2 Changed 14 years ago by
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 14 years ago by
Attachment: | make-instance-unfinalized-class.patch added |
---|
Alternative solution, adding to MAKE-INSTANCE instead
comment:3 Changed 14 years ago by
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 14 years ago by
Milestone: | → 0.24 |
---|
With the prototype patch, this ticket should be doable in the relatively short term.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed in r13217: the error is now about finalizing a FORWARD-REFERENCED-CLASS being impossible.
Patch to signal an error if make-instance applied to a class with unfinalized precendence list