diff options
-rw-r--r-- | share/txr/stdlib/struct.tl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl index ee4bfd18..2f1692f5 100644 --- a/share/txr/stdlib/struct.tl +++ b/share/txr/stdlib/struct.tl @@ -112,7 +112,12 @@ ^(:instance ,name nil)) (name ^(:instance ,name nil))))) - (super-type (find-struct-type super)) + (super-type (if super + (or (find-struct-type super) + (throwf 'eval-error + "~a: inheritance base ~s \ + \ does not name a struct type" + 'defstruct super)))) (stat-si-forms [keep-if (op member @1 '(:static :function)) slot-init-forms car]) (pruned-si-forms (sys:prune-nil-inits stat-si-forms super-type)) |