From 29acede65746ad4af84519011dbb04b737fd8d5b Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Fri, 22 May 1998 07:55:51 +0000
Subject: [PATCH] Replace the temporary constructor function definition
 generated by defconstructor for which CMUCL derives an incorrect return type,
 with a function declaration; problem spotted by Paul W.

---
 pcl/construct.lisp | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/pcl/construct.lisp b/pcl/construct.lisp
index d03ef61d3..2dfc9b9bd 100644
--- a/pcl/construct.lisp
+++ b/pcl/construct.lisp
@@ -123,14 +123,19 @@
               class ~S is defined."
 	     class-name))
     `(progn
-       ;; In order to avoid undefined function warnings, we want to tell
-       ;; the compile time environment that a function with this name and
-       ;; this argument list has been defined.  The portable way to do this
-       ;; is with defun.
-       (proclaim '(notinline ,name))
+       ;; In order to avoid undefined function warnings, we want to
+       ;; tell the compile time environment that a function with this
+       ;; name and this argument list has been defined.  The portable
+       ;; way to do this is with defun.
+       #-cmu (proclaim '(notinline ,name))
+       #-cmu
        (defun ,name ,lambda-list
 	 (declare (ignore ,@(extract-parameters lambda-list)))
 	 (error "Constructor ~S not loaded." ',name))
+       ;; But the derived result type for the above is wrong under CMUCL.
+       #+cmu
+       (proclaim '(ftype ,(ftype-declaration-from-lambda-list lambda-list name)
+		         ,name))
 
        ,(make-top-level-form `(defconstructor ,name)
 			     '(load eval)
-- 
GitLab