diff --git a/compiler/ir1final.lisp b/compiler/ir1final.lisp index 15422697a1371c23062909a921faa779235b51b2..2d1a5917dac9475ca715d41a7feef2174e476e82 100644 --- a/compiler/ir1final.lisp +++ b/compiler/ir1final.lisp @@ -71,27 +71,27 @@ (etypecase leaf (functional (let* ((where (info function where-from name)) -; (type (info function type name)) (dtype (leaf-type leaf)) (node (lambda-bind (main-entry leaf))) (*compiler-error-context* node)) (note-name-defined name :function) - (ecase where - (:assumed - (let ((approx-type (info function assumed-type name))) - (when approx-type - (valid-approximate-type approx-type dtype)))) - ((:declared :defined) -; ... - )) - - (when (and (eq (function-type-returns dtype) *empty-type*) - (policy node (>= safety brevity))) - (compiler-note "Function does not return.")) + (when (function-type-p dtype) + (ecase where + (:assumed + (let ((approx-type (info function assumed-type name))) + (when approx-type + (valid-approximate-type approx-type dtype)))) + ((:declared :defined) + )) + + (when (and (eq (function-type-returns dtype) *empty-type*) + (policy node (>= safety brevity))) + (compiler-note "Function does not return.")) + + (setf (info function type name) dtype) + (clear-info function assumed-type name)) (setf (info function kind name) :function) - (setf (info function where-from name) :defined) - (setf (info function type name) dtype) - (clear-info function assumed-type name))) + (setf (info function where-from name) :defined))) (global-var)))