Changeset 12529


Ignore:
Timestamp:
Aug 4, 2009, 4:30:09 PM (10 years ago)
Author:
gz
Message:

Avoid unknown type warnings at use-time of ftype decl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/compiler/nx0.lisp

    r12525 r12529  
    684684           (%cadr acode-expression)))))
    685685
    686 (defun specifier-type-if-known (typespec &optional env &key whine)
    687   (handler-case (specifier-type typespec env)
     686(defun specifier-type-if-known (typespec &optional env &key whine values)
     687  (handler-case (if values (values-specifier-type typespec env) (specifier-type typespec env))
    688688    (parse-unknown-type (c)
    689689      (when (and whine *compiler-warn-on-undefined-type-references*)
     
    20012001              (nargs (if spread-p (1- (length arglist)) (length arglist))))
    20022002          (flet ((collect-type (arg type)
    2003                    (push (if (and type (neq type *universal-type*) (neq type *wild-type*))
    2004                            `(the ,(type-specifier type) ,arg)
    2005                            arg)
    2006                          typed-arglist))
    2007                  (key-name (x) (key-info-name x))
     2003                   (push (if (and type
     2004                                  (neq type *universal-type*)
     2005                                  (neq type *wild-type*)
     2006                                  (setq type (type-specifier type))
     2007                                  ;; Don't record unknown types, just causes spurious warnings.
     2008                                  (specifier-type-if-known type env :values t))
     2009                             `(the ,type ,arg)
     2010                             arg)
     2011                         typed-arglist))
     2012                 (key-name (x) (key-info-name x))
    20082013                 (whine (&rest reason)
    20092014                   (nx1-whine :ftype-mismatch sym reason arglist spread-p)
Note: See TracChangeset for help on using the changeset viewer.