Custom Query (1030 matches)
Results (751 - 753 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #600 | fixed | defmethod congruency checks | ||
| Description |
(From Pascal Costanza, http://clozure.com/pipermail/openmcl-devel/2009-September/010353.html) Clozure Common Lisp seems to be too eager in its checking of congruency of generic function lambda lists and those of their methods. Consider the following example: ? (defgeneric foo (a b c))
#<STANDARD-GENERIC-FUNCTION FOO #x30004125B93F>
? (add-method
#'foo
(make-instance 'standard-method
:qualifiers '()
:specializers (list (find-class 't) (find-class 't) (find-class 't))
:lambda-list '(a b c)
:function (lambda (&rest args) (print args))))
> Error: Lambda list of method #<STANDARD-METHOD NIL (T T T)>
> is incompatible with that of the generic function FOO.
> Method's lambda-list : (A B C)
> Generic-function's : (A B C)
While executing: CCL::CHECK-DEFMETHOD-CONGRUENCY, in process
listener(1).
Indeed, check-defmethod-congruency uses the method-function to check for congruency, while it should actually use method-lambda-list for that purpose (at least in non-standard cases). As far as I can tell at the moment, this is the only remaining step so that I can provide compatibility in Closer to MOP of the generic function invocation protocol to the specification in AMOP. |
|||
| #1096 | fixed | defsetf ignorable declarations are ignored. | ||
| Description |
It seems the way ignore or ignorable declarations are implemented with defsetf doesn't make them entirely ignored, since a warning is still issued, and indeed, an uninterned symbol used in place of the parameter is still present and not declared anymore as ignored or ignorable. (defgeneric bug (x y &optional z))
(defmethod bug ((x integer) y &optional z)
(declare (ignorable z))
(+ x y))
(defmethod bug ((x string) y &optional z)
(list (aref x y) z))
(defun set-bug (x y new-value)
(+ x y new-value))
(defsetf bug (x y &optional z) (new-value)
(declare (ignorable z))
`(set-bug ,x ,y ,new-value))
(defun f ()
(setf (bug 42 0) 33))
(eval-when (:load-toplevel :execute)
(pprint (swank-backend:macroexpand-all
'(defun f ()
(setf (bug 42 0) 33)))))
#|
dictionary> (load (compile-file #P"~/ccl-bug.lisp"))
;Compiler warnings for "home:ccl-bug.lisp.newest" :
; In f: Unused lexical variable #:z
(progn (ccl::%defun (ccl:nfunction f
lambda
nil
(declare (ccl::global-function-name f))
(block f
(let* ((#:g90598 42) (#:g90597 0))
(declare (ignorable #:g90598 #:g90597))
(multiple-value-call
(lambda (&optional #:g90596 &rest #:ignore)
(declare (ignore #:ignore))
((lambda (#:x #:y &optional #:z) (set-bug #:x #:y #:g90596))
#:g90598 #:g90597))
33))))
'nil)
'f)#P"/home/pjb/ccl-bug.lx64fsl"
|#
|
|||
| #221 | fixed | defstruct accessors don't check argument type | ||
| Description |
? (defstruct foo x) FOO ? (defstruct baz y) BAZ ? (foo-x (make-baz)) NIL Should be an error. |
|||
