mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-17 06:42:18 -08:00
Evaluation of the constant in EQL specializers now takes place in the lexical environment in which DEFMETHOD is enclosed.
This commit is contained in:
parent
9052752e65
commit
3d1e56e0ec
2 changed files with 14 additions and 5 deletions
|
|
@ -112,6 +112,10 @@ ECL 0.9g
|
|||
- Variable SI::*GC-VERBOSE* controls whether ECL emits messages when FASL
|
||||
libraries are garbage colleced.
|
||||
|
||||
- Values of EQL specializers are now evaluated in the lexical environment
|
||||
in which the DEFMETHOD is enclosed. This makes it now possible to write
|
||||
(defmethod foo (x) (defmethod bar ((f (eql x)))))
|
||||
|
||||
* ANSI compatibility:
|
||||
|
||||
- Several functions that signaled type-errors did not set the right values
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
(INSTALL-METHOD
|
||||
',name
|
||||
',qualifiers
|
||||
',specializers
|
||||
,(list 'si::quasiquote specializers)
|
||||
',specialized-lambda-list
|
||||
',doc
|
||||
',plist
|
||||
|
|
@ -456,10 +456,15 @@
|
|||
arg))
|
||||
(push (if (listp arg) (first arg) arg) parameters)
|
||||
(push (if (listp arg) (first arg) arg) lambda-list)
|
||||
(push (if (listp arg) (if (consp (second arg))
|
||||
`(eql ,(eval (cadadr arg)))
|
||||
(second arg))
|
||||
())
|
||||
(push (cond ((atom arg) '())
|
||||
((atom (setf arg (second arg))) arg)
|
||||
((not (eql (first arg) 'EQL))
|
||||
(error 'simple-program-error
|
||||
"Syntax error in method specializer ~A" arg))
|
||||
((constantp (setf arg (second arg)))
|
||||
`(eql ,arg))
|
||||
(t
|
||||
(list 'eql (list 'si::unquote arg))))
|
||||
specializers))
|
||||
(when (eq (first arglist) '&OPTIONAL)
|
||||
(push (pop arglist) lambda-list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue