mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Highlight the slot clause for bad initforms in defclass.
This commit is contained in:
parent
ecb6518979
commit
1e7d2505db
|
|
@ -345,23 +345,22 @@
|
|||
(eq type t))
|
||||
'(function constantly-0))
|
||||
(t
|
||||
(let* ((initform (if (eq type t)
|
||||
initform
|
||||
`(sb-c::with-source-form ,source-form
|
||||
(the* (,type :source-form ,initform
|
||||
;; Don't want to insert a cast,
|
||||
;; as a subclass may change the type,
|
||||
;; just report this at compile-time.
|
||||
:use-annotations t)
|
||||
,initform))))
|
||||
(let* ((initform `(sb-c::with-source-form ,source-form
|
||||
(the* (,type :source-form ,initform
|
||||
;; Don't want to insert a cast,
|
||||
;; as a subclass may change the type,
|
||||
;; just report this at compile-time.
|
||||
:use-annotations t)
|
||||
,initform)))
|
||||
(entry (assoc initform *initfunctions-for-this-defclass*
|
||||
:test #'equal)))
|
||||
(unless entry
|
||||
(setq entry (list initform
|
||||
(gensym)
|
||||
`(function (lambda ()
|
||||
(declare (optimize
|
||||
(sb-c:store-coverage-data 0)))
|
||||
`(function
|
||||
(lambda ()
|
||||
(declare (optimize (sb-c:store-coverage-data 0)
|
||||
(sb-c:verify-arg-count 0)))
|
||||
,initform))))
|
||||
(push entry *initfunctions-for-this-defclass*))
|
||||
(cadr entry)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue