From 9e5bfb3aa76b154f464c4e0145988ed9d6c0ea9c Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Wed, 8 Jul 2009 21:32:33 +0200 Subject: [PATCH] Fixed computation of a the values list from a values type: &optional and &rest types must result in an or-type between NULL and the denoted type. --- src/cmp/cmptype.lsp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmp/cmptype.lsp b/src/cmp/cmptype.lsp index 68e7624fd..68345b358 100644 --- a/src/cmp/cmptype.lsp +++ b/src/cmp/cmptype.lsp @@ -183,19 +183,19 @@ (output '()) (n length (1- n))) ((or (null l) (zerop n)) (nreverse output)) - (let ((t (pop l))) - (case t + (let ((type (pop l))) + (case type (&optional (when (null l) (cmperr "Syntax error in type expression ~S" type)) - (setf t (pop l))) + (setf type (pop l))) (&rest (when (null l) (cmperr "Syntax error in type expression ~S" type)) - (setf t (pop l)) + (setf type (pop l)) (return-from values-type-to-n-types (nreconc output (make-list n :initial-element l))))) - (push t output))))) + (push type output))))) (defun values-type-and (t1 t2) (labels ((values-type-p (type)