This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: GSOC | Extending Common Lisp support
On 06/06/2012 01:34 PM, Jamison Hope wrote:
Yup, just found that. We need a check something like that the outer
procedure's original declaration is within the same enclosing LetExp
that we're in now? Or maybe that we're within a SetExp? Is it ever
correct to do a rebinding outside of a set?
The attached patch seems to work.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
Index: gnu/expr/ProcInitializer.java
===================================================================
--- gnu/expr/ProcInitializer.java (revision 7245)
+++ gnu/expr/ProcInitializer.java (working copy)
@@ -30,7 +30,8 @@
Declaration pdecl = proc.nameDecl;
Object pname = pdecl == null ? proc.getName() : pdecl.getSymbol();
ModuleMethod oldproc = null;
- if (comp.immediate && pname != null && pdecl != null)
+ if (comp.immediate && pname != null
+ && pdecl != null && pdecl.context instanceof ModuleExp)
{
// In interactive mode allow dynamic rebinding of procedures.
// If there is an existing ModuleMethod binding, re-use it.