Skip to content
Snippets Groups Projects
Commit 29acede6 authored by dtc's avatar dtc
Browse files

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.
parent da4ebe3b
Branches
Tags
No related merge requests found
...@@ -123,14 +123,19 @@ ...@@ -123,14 +123,19 @@
class ~S is defined." class ~S is defined."
class-name)) class-name))
`(progn `(progn
;; In order to avoid undefined function warnings, we want to tell ;; In order to avoid undefined function warnings, we want to
;; the compile time environment that a function with this name and ;; tell the compile time environment that a function with this
;; this argument list has been defined. The portable way to do this ;; name and this argument list has been defined. The portable
;; is with defun. ;; way to do this is with defun.
(proclaim '(notinline ,name)) #-cmu (proclaim '(notinline ,name))
#-cmu
(defun ,name ,lambda-list (defun ,name ,lambda-list
(declare (ignore ,@(extract-parameters lambda-list))) (declare (ignore ,@(extract-parameters lambda-list)))
(error "Constructor ~S not loaded." ',name)) (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) ,(make-top-level-form `(defconstructor ,name)
'(load eval) '(load eval)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment