chiark / gitweb /
src/c-types-impl.lisp (arguments-lists-equal-p): Fix stupid bug.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 16 Dec 2015 07:20:53 +0000 (07:20 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 13:40:39 +0000 (14:40 +0100)
If some ARG-B is `:ellipsis', but the corresponding ARG-A is a proper
argument object, then we'd have a type error applying `argument-type' to
ARG-B.  Make sure this doesn't happen.

src/c-types-impl.lisp

index 122744f26997ce4413752b34eefa7d1d085df7ab..cea30575579d290c54a43573cd4d1a0feabb6665 100644 (file)
@@ -424,8 +424,9 @@ (defun argument-lists-equal-p (list-a list-b)
        (every (lambda (arg-a arg-b)
                (if (eq arg-a :ellipsis)
                    (eq arg-b :ellipsis)
-                   (c-type-equal-p (argument-type arg-a)
-                                   (argument-type arg-b))))
+                   (and (argumentp arg-a) (argumentp arg-b)
+                        (c-type-equal-p (argument-type arg-a)
+                                        (argument-type arg-b)))))
              list-a list-b)))
 
 ;; Class definition.