Ignore:
Timestamp:
Jun 7, 2010, 3:52:34 AM (9 years ago)
Author:
rme
Message:

In the DEFSTRUCT macro, define constructors later so that
something like

(defstruct foo

(a nil :type (or null foo)))

works without warning about "unknown or invalid type FOO".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/defstruct-lds.lisp

    r13696 r13788  
    249249       (remove-structure-defs  ',struct-name) ; lose any previous defs
    250250        ,.(defstruct-slot-defs sd refnames env)
    251         ,.(if constructor (list (defstruct-constructor sd constructor)))
    252         ,.(defstruct-boa-constructors sd boa-constructors)
    253251        ,.(if copier (defstruct-copier sd copier env))
    254252        ,.(if predicate (defstruct-predicate sd named predicate env))
     
    264262         ,.(if documentation (list documentation)))
    265263        ,.(%defstruct-compile sd refnames env)
     264        ,.(defstruct-boa-constructors sd boa-constructors)
     265        ,.(if constructor (list (defstruct-constructor sd constructor)))
    266266       ;; Wait until slot accessors are defined, to avoid
    267267       ;; undefined function warnings in the print function/method.
Note: See TracChangeset for help on using the changeset viewer.