X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fctype.lisp;h=948c0df4b95c761d109781195a1a8e98e7391f9f;hb=31361af9eb64344f521abbb245ea784c76c746e5;hp=4c08c98970d267035d2658135a58584f2f0679dd;hpb=ce02ab2ecd9c6ae2e570abd8c93ebf3be55bbdad;p=sbcl.git diff --git a/src/compiler/ctype.lisp b/src/compiler/ctype.lisp index 4c08c98..948c0df 100644 --- a/src/compiler/ctype.lisp +++ b/src/compiler/ctype.lisp @@ -195,13 +195,12 @@ (let ((ctype (continuation-type cont))) (multiple-value-bind (int win) (funcall *test-function* ctype type) (cond ((not win) - (note-slime "can't tell whether the ~:R argument is a ~S" n - (type-specifier type)) + (note-slime "can't tell whether the ~:R argument is a ~S" + n (type-specifier type)) nil) ((not int) - (note-lossage "The ~:R argument is a ~S, not a ~S." n - (type-specifier ctype) - (type-specifier type)) + (note-lossage "The ~:R argument is a ~S, not a ~S." + n (type-specifier ctype) (type-specifier type)) nil) ((eq ctype *empty-type*) (note-slime "The ~:R argument never returns a value." n) @@ -326,10 +325,10 @@ (defstruct (approximate-function-type (:copier nil)) ;; the smallest and largest numbers of arguments that this function ;; has been called with. - (min-args call-arguments-limit :type fixnum) + (min-args sb!xc:call-arguments-limit :type fixnum) (max-args 0 :type fixnum) - ;; A list of lists of the all the types that have been used in each argument - ;; position. + ;; a list of lists of the all the types that have been used in each + ;; argument position (types () :type list) ;; A list of APPROXIMATE-KEY-INFO structures describing all the ;; things that looked like &KEY arguments. There are distinct @@ -345,10 +344,10 @@ ;; The position at which this keyword appeared. 0 if it appeared as the ;; first argument, etc. (position (required-argument) :type fixnum) - ;; A list of all the argument types that have been used with this keyword. + ;; a list of all the argument types that have been used with this keyword (types nil :type list) - ;; True if this keyword has appeared only in calls with an obvious - ;; :allow-other-keys. + ;; true if this keyword has appeared only in calls with an obvious + ;; :ALLOW-OTHER-KEYS (allowp nil :type (member t nil))) ;;; Return an APPROXIMATE-FUNCTION-TYPE representing the context of @@ -424,7 +423,8 @@ (values boolean boolean)) valid-approximate-type)) (defun valid-approximate-type (call-type type &optional - (*test-function* #'types-intersect) + (*test-function* + #'types-equal-or-intersect) (*error-function* #'compiler-style-warning) (*warning-function* #'compiler-note)) @@ -731,7 +731,8 @@ (atype (when return (continuation-asserted-type (return-result return))))) (cond - ((and atype (not (values-types-intersect atype type-returns))) + ((and atype (not (values-types-equal-or-intersect atype + type-returns))) (note-lossage "The result type from ~A:~% ~S~@ conflicts with the definition's result type assertion:~% ~S"