From 43c1fa847c7a392e145f7d39b5e1ef2cef83e78c Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Sun, 24 Nov 2002 06:08:39 +0000 Subject: [PATCH] 0.7.9.64: * Fix bug in SUBTYPEP of function types, reported by Valtteri Vuorik, explained by CSR. * Fix 3AND. --- src/code/late-type.lisp | 6 +++--- tests/type.pure.lisp | 9 +++++++++ version.lisp-expr | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index a790c44..f0b2fc6 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -237,13 +237,13 @@ (multiple-value-bind (val2 win2) ,y (if (and val1 val2) (values t t) - (values nil (or win1 win2)))))))) + (values nil (and win2 (not val2))))))))) (3and (values-subtypep (fun-type-returns type1) (fun-type-returns type2)) (cond ((fun-type-wild-args type2) (values t t)) ((fun-type-wild-args type1) (values nil t)) - ((not (or (fun-type-simple-p type1) - (fun-type-simple-p type2))) + ((not (and (fun-type-simple-p type1) + (fun-type-simple-p type2))) (values nil nil)) (t (multiple-value-bind (min1 max1) (fun-type-nargs type1) (multiple-value-bind (min2 max2) (fun-type-nargs type2) diff --git a/tests/type.pure.lisp b/tests/type.pure.lisp index fcda6d6..e5bd13b 100644 --- a/tests/type.pure.lisp +++ b/tests/type.pure.lisp @@ -161,3 +161,12 @@ ;;; signalled an error on this expression. (subtypep '(function (fixnum) (values package boolean)) '(function (t) (values package boolean))) + +;;; bug reported by Valtteri Vuorik +(compile nil '(lambda () (member (char "foo" 0) '(#\. #\/) :test #'char=))) +(assert (not (equal (multiple-value-list + (subtypep '(function ()) '(function (&rest t)))) + '(nil t)))) +(assert (not (equal (multiple-value-list + (subtypep '(function (&rest t)) '(function ()))) + '(t t)))) diff --git a/version.lisp-expr b/version.lisp-expr index 565f278..ab8084c 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.9.63" +"0.7.9.64" -- 1.7.10.4