From c70ef2dcdd916cb3a7380b584ced3b7f18d17d14 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Sat, 29 Oct 1994 05:00:17 +0000 Subject: [PATCH] More correct declaration hack. --- code/loop.lisp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/loop.lisp b/code/loop.lisp index 01c63395d..1c09034e4 100644 --- a/code/loop.lisp +++ b/code/loop.lisp @@ -1117,14 +1117,7 @@ collected result will be returned as the value of the LOOP." ;; type specifier is unambiguously, and without need of translation, ;; a common lisp type specifier or pattern (matching the variable) thereof. (loop-pop-source) - #-cmu - (loop-pop-source) - #+cmu - (let* ((spec (loop-pop-source)) - (init (loop-typed-init spec))) - (if (typep init spec) - spec - `(or (member ,init) spec)))) + (loop-pop-source)) ((symbolp z) ;;This is the (sort of) "old" syntax, even though we didn't used to support all of @@ -1228,7 +1221,13 @@ collected result will be returned as the value of the LOOP." (cond ((or (null name) (null dtype) (eq dtype t)) nil) ((symbolp name) (unless (or (eq dtype t) (member (the symbol name) *loop-nodeclare*)) - (push `(type ,dtype ,name) *loop-declarations*))) + (let ((dtype #-cmu dtype + #+cmu + (let ((init (loop-typed-init dtype))) + (if (typep init dtype) + dtype + `(or (member ,init) ,dtype))))) + (push `(type ,dtype ,name) *loop-declarations*)))) ((consp name) (cond ((consp dtype) (loop-declare-variable (car name) (car dtype)) -- GitLab