arguments, but it could be tricky to check result types of PROG1, IF
etc.
-221:
- Sometime between sbcl-0.7.8.51 and sbcl-0.7.9.5 the system lost the
- ability to compile
- (declaim (ftype (function (fixnum) (values package boolean)) f1))
- (declaim (ftype (function (t) (values package boolean)) f2))
- (defun ow (b x)
- (funcall (if b #'f1 #'f2) x))
- Now the compiler dies with
- SUBTYPEP is illegal on this type: (VALUES PACKAGE (MEMBER T NIL))
- apparently when attempting to infer the type of the IF expression.
-
DEFUNCT CATEGORIES OF BUGS
IR1-#:
(type-specifier
(fun-type-returns type)))))
-;;; Since all function types are equivalent to FUNCTION, they are all
-;;; subtypes of each other.
(!define-type-method (function :simple-subtypep) (type1 type2)
(flet ((fun-type-simple-p (type)
(not (or (fun-type-rest type)
(if (and val1 val2)
(values t t)
(values nil (or win1 win2))))))))
- (3and (csubtypep (fun-type-returns type1)
- (fun-type-returns type2))
+ (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)
(etypecase x
(character (write-char x s))
(integer (write-byte x s)))))
-
(bug217-1 #\1 *standard-output*)
+
+;;; bug 221: tried and died on CSUBTYPEP (not VALUES-SUBTYPEP) of the
+;;; function return types when inferring the type of the IF expression
+(declaim (ftype (function (fixnum) (values package boolean)) bug221f1))
+(declaim (ftype (function (t) (values package boolean)) bug221f2))
+(defun bug221 (b x)
+ (funcall (if b #'bug221f1 #'bug221f2) x))
\f
;;;; tests not in the problem domain, but of the consistency of the
;;;; compiler machinery itself
(format t "~&~S~%" type)
(assert (not (sb-kernel:unknown-type-p (sb-kernel:specifier-type type))))
(assert (atom (sb-kernel:type-specifier (sb-kernel:specifier-type type))))))
+
+;;; a bug underlying the reported bug #221: The SB-KERNEL type code
+;;; signalled an error on this expression.
+(subtypep '(function (fixnum) (values package boolean))
+ '(function (t) (values package boolean)))
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.9.18"
+"0.7.9.19"