From: Mark Wooding Date: Mon, 9 Jul 2018 12:04:38 +0000 (+0100) Subject: src/module-parse.lisp (parse-class-body): Check for duplicate superclasses. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/0c289c54fb0a31491aa1d2b030851337430ccd71 src/module-parse.lisp (parse-class-body): Check for duplicate superclasses. It turns out that this is a thing that can happen. Catch it early rather than waiting for a less helpful message during CPL construction. --- diff --git a/src/module-parse.lisp b/src/module-parse.lisp index 0a3cd28..747bdf7 100644 --- a/src/module-parse.lisp +++ b/src/module-parse.lisp @@ -267,7 +267,14 @@ (continue () (setf duff t) (list (find-sod-class "SodObject")))))) - superclasses)) + (find-duplicates (lambda (first second) + (declare (ignore second)) + (setf duff t) + (cerror* "Class `~A' has duplicate ~ + direct superclass `~A'" + name first)) + superclasses) + (delete-duplicates superclasses))) (synthetic-name (or name (let ((var (synthetic-name))) (unless pset