Propagate the type of a function when invoked through APPLY

This commit is contained in:
Juan Jose Garcia Ripoll 2011-12-26 23:16:13 +01:00
parent 92d1290de4
commit 2feea55b31

View file

@ -32,7 +32,13 @@
(member (caadr fun) '(LAMBDA EXT::LAMBDA-BLOCK)))
(c1apply (list* (second fun) arguments)))
(t
(c1funcall (list* '#'APPLY args))))))
(let ((form (c1funcall (list* '#'APPLY args))))
(when (and (consp fun) (eq (first fun) 'FUNCTION))
(let* ((fname (second fun))
(type (get-return-type fname)))
(when type
(setf (c1form-type form) type))))
form)))))
;;----------------------------------------------------------------------
;; We transform BOOLE into the individual operations, which have