Custom Query (1030 matches)
Results (748 - 750 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #1084 | fixed | deficient error reporting in flet on bad lambda-list | ||
| Description |
cl-user> (compile-file #P"~/test-flet.lisp")
#P"/home/pjb/test-flet.lx64fsl"
nil
nil
cl-user> (cat #P"~/test-flet.lisp")
(defun f (z)
(flet ((g (x) (list x x))
(u z))
(g z)))
; No value
cl-user>
The fact that the "lambda-list" for u is an atom should signal a program-error. CLHS flet says: lambda-list---a lambda list; for flet and labels, it is an ordinary lambda list; and CLHS 3.4.1 says: The syntax for ordinary lambda lists is as follows:
lambda-list::= (var*
[&optional {var | (var [init-form [supplied-p-parameter]])}*]
[&rest var]
[&key {var | ({var | (keyword-name var)} [init-form [supplied-p-parameter]])}* [&allow-other-keys]]
[&aux {var | (var [init-form])}*])
so lambda-list for flet and labels cannot be an atom. And in the case where I found this, u was also a global function, so perhaps this could be tested by the compiler to add a hint in the error message that perhaps the form was intented to be in the body of the flet. |
|||
| #254 | fixed | define-method-combination does not recognize full set of argument lambda list keywords | ||
| Description |
Welcome to Clozure Common Lisp Version 1.2-r8591:8592MS (DarwinPPC32)!
? (define-method-combination standard+ ()
((around (:around))
(before (:before))
(primary () :required t)
(after (:after)))
(:arguments &optional args)
(flet ((call-methods (methods)
(mapcar #'(lambda (method)
`(call-method ,method))
methods)))
(let ((form (if (or before after (rest primary))
`(multiple-value-prog1
(progn ,@(call-methods before)
(call-method ,(first primary)
,(rest primary)))
,@(call-methods (reverse after)))
`(call-method ,(first primary)))))
`(progn (print ,args)
,(if around
`(call-method ,(first around)
(,@(rest around)
(make-method ,form)))
form)))))
;Compiler warnings :
; Unused lexical variable &OPTIONAL, in an anonymous lambda form
STANDARD+
?
|
|||
| #1125 | duplicate | defining a function named nil | ||
| Description |
It's disgusting I know. I blame the bad company I hang with. One or two of whom like to defining functions on keywords. So I think "Yeah! how about NIL?" bash-3.2$ ccl64 Welcome to Clozure Common Lisp Version 1.9-r15759 (DarwinX8664)! ? (defun nil () (print :shame-on-you)) Lisp Breakpoint ? for help [77472] Clozure CL kernel debugger: exit [77472] Clozure CL kernel debugger: NIL ? (funcall (symbol-function nil)) :SHAME-ON-YOU :SHAME-ON-YOU 1 > (ccl:quit) bash-3.2$
|
|||
Note:
See TracQuery
for help on using queries.
