From 9a5fd01564fd150834fbcf987963c6457de23731 Mon Sep 17 00:00:00 2001 From: Roman Marynchak Date: Tue, 29 Mar 2011 21:48:24 +0300 Subject: [PATCH] Prohibit the symbol * inside VALUES compound type specifier In VALUES-SPECIFIER-TYPE, check this situation explicitly. --- src/code/early-type.lisp | 6 ++++++ tests/compiler.pure.lisp | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/code/early-type.lisp b/src/code/early-type.lisp index a4160a2..5d9de16 100644 --- a/src/code/early-type.lisp +++ b/src/code/early-type.lisp @@ -542,6 +542,12 @@ :init-wrapper !cold-init-forms) ((orig equal-but-no-car-recursion)) (let ((u (uncross orig))) + ;; KLUDGE: directly check that symbol * is not present + ;; as a value-type inside VALUES compound type specifier. + (when (and (listp u) + (eq 'values (car u)) + (member '* (cdr u))) + (error "The symbol * may not be among the value-types in VALUES.")) (or (info :type :builtin u) (let ((spec (typexpand u))) (cond diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 0ead2f3..33c6201 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3794,3 +3794,9 @@ (assert warnings-p) (assert failure-p))) +(with-test (:name :bug-736418) + (multiple-value-bind (function warnings-p failure-p) + (compile nil '(lambda () (the (values *) 42))) + (assert warnings-p) + (assert failure-p))) + -- 1.6.3.3