X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/e0808c472145fc81e52898bc9ac289e10c4f4f41..d5fdd49e70b734b791eb907706f92da5775e2a8b:/src/c-types-class-impl.lisp diff --git a/src/c-types-class-impl.lisp b/src/c-types-class-impl.lisp index 1827415..2908d75 100644 --- a/src/c-types-class-impl.lisp +++ b/src/c-types-class-impl.lisp @@ -68,7 +68,7 @@ (atypecase (gethash name *module-type-map*) (null nil) (c-class-type it) - (t (error "Type `~A' (~A) is not a class" name it)))) + (t (error "Type `~A' is not a class" name)))) (export 'make-class-type) (defun make-class-type (name &optional qualifiers) @@ -128,9 +128,13 @@ (export 'find-sod-class) (defun find-sod-class (name) "Return the `sod-class' object with the given NAME." - (aif (find-class-type name) - (or (c-type-class it) (error "Class `~A' is incomplete" name)) - (error "Type `~A' not known" name))) + (acond ((find-class-type name) + (or (c-type-class it) + (error "Class `~A' is incomplete" name))) + ((find-simple-c-type name) + (error "Type `~A' is not a class" name)) + (t + (error "Type `~A' not known" name)))) (export 'record-sod-class) (defun record-sod-class (class)