*empty-type*)
((not (values-type-p type))
type)
- (t (or (car (args-type-required type))
- (car (args-type-optional type))
- (args-type-rest type)
- (specifier-type 'null)))))
+ ((car (args-type-required type)))
+ (t (type-union (specifier-type 'null)
+ (or (car (args-type-optional type))
+ (args-type-rest type)
+ (specifier-type 'null))))))
;;; Return the minimum number of arguments that a function can be
;;; called with, and the maximum number or NIL. If not a function
(def fast-if-eq-character fast-char=/character)
(def fast-if-eq-character/c fast-char=/character/c)
(def fast-if-eq-fixnum fast-eql/fixnum)
- (def fast-if-eq-fixnum/x fast-eql-c/fixnum)
+ (def fast-if-eq-fixnum/c fast-eql-c/fixnum)
(def fast-if-eq/signed fast-if-eql/signed)
(def fast-if-eq-c/signed fast-if-eql-c/signed)
(def fast-if-eq/unsigned fast-if-eql/unsigned)
(def fast-if-eq-character fast-char=/character)
(def fast-if-eq-character/c fast-char=/character/c)
(def fast-if-eq-fixnum fast-eql/fixnum)
- (def fast-if-eq-fixnum/x fast-eql-c/fixnum)
+ (def fast-if-eq-fixnum/c fast-eql-c/fixnum)
(def fast-if-eq/signed fast-if-eql/signed)
(def fast-if-eq-c/signed fast-if-eql-c/signed)
(def fast-if-eq/unsigned fast-if-eql/unsigned)
(assert (subtypep `(rational * -1/2)
`(or (integer * -1)
(and (rational * -1/2) (not integer))))))
+
+;; for the longest time (at least 05525d3a), single-value-type would
+;; return CHARACTER on this.
+(with-test (:name :single-value-&optional-type)
+ (assert (sb-c::type= (sb-c::single-value-type
+ (sb-c::values-specifier-type '(values &optional character)))
+ (sb-c::specifier-type '(or null character)))))