X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/e45a106df3272c787444bc6f7b8920016b7fc677..refs/heads/mdw/progfmt:/src/class-finalize-proto.lisp diff --git a/src/class-finalize-proto.lisp b/src/class-finalize-proto.lisp index 2f589b8..7a64ae3 100644 --- a/src/class-finalize-proto.lisp +++ b/src/class-finalize-proto.lisp @@ -92,13 +92,19 @@ (defgeneric compute-chains (class) If the chains are ill-formed (i.e., not distinct) then an error is signalled.")) -(export 'guess-metaclass) -(defgeneric guess-metaclass (class) +(export 'check-class-initializer) +(defgeneric check-class-initializer (slot class) (:documentation - "Determine a suitable metaclass for the CLASS. + "Check that SLOT has an appropriate initializer. - The default behaviour is to choose the most specific metaclass of any of - the direct superclasses of CLASS, or to signal an error if that failed.")) + Signal an appropriate continuable error, possibly protected by + `finalization-error'. + + The initializer might come either from the SLOT's defining class (which it + already knows), or from the prospective instance CLASS, of which the + defining class will be (a superclass of) the metaclass. Or, if the slot + is magical, then the initial value might come from somewhere else and it + might be forbidden for a programmer to set it explicitly.")) (export 'check-sod-class) (defgeneric check-sod-class (class)