X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/6e92afa75860a55640efa6f3ba39f9624b41e8a8..2c6153373f927d948a74b283ebb16330af8ee49a:/src/class-utilities.lisp diff --git a/src/class-utilities.lisp b/src/class-utilities.lisp index 38cb75e..a26afd2 100644 --- a/src/class-utilities.lisp +++ b/src/class-utilities.lisp @@ -173,11 +173,12 @@ * all of whose characters are alphanumeric or underscores * and which doesn't contain two consecutive underscores." - (and (stringp name) - (plusp (length name)) - (alpha-char-p (char name 0)) - (every (lambda (ch) (or (alphanumericp ch) (char= ch #\_))) name) - (not (search "__" name)))) + (or (typep name 'temporary-variable) + (and (stringp name) + (plusp (length name)) + (alpha-char-p (char name 0)) + (every (lambda (ch) (or (alphanumericp ch) (char= ch #\_))) name) + (not (search "__" name))))) (export 'find-root-superclass) (defun find-root-superclass (class) @@ -212,10 +213,15 @@ (sod-class-chains super))) supers))) (list class)))) - (cond ((null roots) (error "Class ~A has no root class!" class)) - ((cdr roots) (error "Class ~A has multiple root classes ~ - ~{~A~#[~; and ~;, ~]~}" - class roots)) + (cond ((null roots) + (error "Class ~A has no root class!" class)) + ((cdr roots) + (cerror* "Class ~A has multiple root classes ~ + ~{~#[~;~A~;~A and ~A~:; ~@{~A, ~#[~;and ~A~]~}~]~}" + class roots) + (let ((state (make-inheritance-path-reporter-state class))) + (dolist (root roots) + (report-inheritance-path state root)))) (t (car roots))))) (export 'find-root-metaclass)