Opened 12 years ago

Last modified 22 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 ehuelsmann

Milestone: 1.2.0

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).

comment:2 Changed 12 years ago by stassats

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 Evenson Not Org

Version: 1.2.0-dev

comment:4 Changed 11 years ago by Evenson Not Org

Milestone: 1.2.01.3.0

comment:5 Changed 11 years ago by Mark Evenson

Milestone: 1.3.02.0

Ticket retargeted after milestone closed

comment:6 Changed 11 years ago by Mark Evenson

Milestone: 2.02.0.0

Milestone renamed

comment:7 Changed 11 years ago by Mark Evenson

Milestone: 2.0.01.4.0

comment:8 Changed 8 years ago by Mark Evenson

Milestone: 1.4.01.5.0

Ticket retargeted after milestone closed

comment:9 Changed 8 years ago by Mark Evenson

Milestone: 1.5.01.6.0

Ticket retargeted after milestone closed

comment:10 Changed 5 years ago by Mark Evenson

Milestone: 1.6.01.6.1

Ticket retargeted after milestone closed

comment:11 Changed 5 years ago by Mark Evenson

Milestone: 1.6.11.6.2

Ticket retargeted after milestone closed

comment:12 Changed 5 years ago by Mark Evenson

Milestone: 1.6.21.7.0

comment:13 Changed 5 years ago by Mark Evenson

Milestone: 1.7.01.7.1

Ticket retargeted after milestone closed

comment:14 Changed 4 years ago by Mark Evenson

Milestone: 1.7.11.7.2

Ticket retargeted after milestone closed

comment:15 Changed 4 years ago by Mark Evenson

Milestone: 1.7.21.8.0

Milestone renamed

comment:16 Changed 4 years ago by Mark Evenson

Milestone: 1.8.01.8.1

Ticket retargeted after milestone closed

comment:17 Changed 22 months ago by Mark Evenson

Milestone: 1.8.11.9.2
Note: See TracTickets for help on using tickets.