Opened 12 years ago
Last modified 21 months ago
#238 new defect
Bad error when reading #S(...) for a partially defined structure
Reported by: | stassats | Owned by: | ehuelsmann |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.2 |
Component: | compiler | Version: | 1.2.0-dev |
Keywords: | Cc: | ||
Parent Tickets: |
Description
(defstruct struct a) (defvar *t* #S(struct :a 1))
Running compile-file on it results in "The assertion NIL failed."
At compile-time defstruct lets the compiler know that the structure exists, but the constructor and predicate functions are not defined until load time. #S tries to call a stump version of one of these functions. After exiting the debugger calling either (make-struct) or (struct-p) results in the same assertion failure
Change History (17)
comment:1 Changed 12 years ago by
Milestone: | → 1.2.0 |
---|
comment:2 Changed 12 years ago by
That's what I meant, I don't expect this to work, but concerned about the error itself. And this doesn't work in other implementations as well.
comment:3 Changed 12 years ago by
Version: | → 1.2.0-dev |
---|
comment:4 Changed 11 years ago by
Milestone: | 1.2.0 → 1.3.0 |
---|
comment:7 Changed 11 years ago by
Milestone: | 2.0.0 → 1.4.0 |
---|
comment:12 Changed 4 years ago by
Milestone: | 1.6.2 → 1.7.0 |
---|
comment:17 Changed 21 months ago by
Milestone: | 1.8.1 → 1.9.2 |
---|
Note: See
TracTickets for help on using
tickets.
While the spec says "The #S reader macro might or might not recognize the newly defined structure type name at compile time.", this is not an ansi failure.
However, I concur that the error is far from helpful in finding the actual problem. Let's focus on that here first. We could (later) see if we want to make the constructor available for the reader (I see value in that as well).