X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fctype.lisp;h=3fb91d173db646da3fa5b97bda7d2cbc308f203e;hb=94ac5b7c3ff37850210b6fc9a7593cf1c5752993;hp=35538cac6ad1571b7364dc78cd2a98a233b0eb80;hpb=d40a76606c86722b0aef8179155f9f2840739b72;p=sbcl.git diff --git a/src/compiler/ctype.lisp b/src/compiler/ctype.lisp index 35538ca..3fb91d1 100644 --- a/src/compiler/ctype.lisp +++ b/src/compiler/ctype.lisp @@ -102,12 +102,12 @@ ;;; explain the result. We bind *COMPILER-ERROR-CONTEXT* to the ;;; combination node so that COMPILER-WARNING and related functions ;;; will do the right thing if they are supplied. -(defun valid-function-use (call type &key - ((:argument-test *ctype-test-fun*) #'csubtypep) - (result-test #'values-subtypep) - (strict-result nil) - ((:lossage-fun *lossage-fun*)) - ((:unwinnage-fun *unwinnage-fun*))) +(defun valid-fun-use (call type &key + ((:argument-test *ctype-test-fun*) #'csubtypep) + (result-test #'values-subtypep) + (strict-result nil) + ((:lossage-fun *lossage-fun*)) + ((:unwinnage-fun *unwinnage-fun*))) (declare (type function result-test) (type combination call) (type fun-type type)) (let* ((*lossage-detected* nil) @@ -759,3 +759,13 @@ (dolist (ref (leaf-refs var)) (derive-node-type ref type))))) t)))))) + +(defun check-catch-tag-type (tag) + (declare (type continuation tag)) + (let ((ctype (continuation-type tag))) + (when (csubtypep ctype (specifier-type '(or number character))) + (compiler-style-warn "~@" + (continuation-source tag) + (type-specifier (continuation-type tag))))))