This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using 'eval' wrongly?


Jocelyn Paine wrote:

> I'm testing that I can construct expressions and evaluate them from Java.
> There's some code below which I think ought to call eval to evaluate (- 1
> 2), and return -1. What it actually seems to return is an empty Values,
> presumably representing #!void.

I just got private email about the same problem.  Please try the
attached patch.

Index: ModuleExp.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/ModuleExp.java,v
retrieving revision 1.20
diff -u -r1.20 ModuleExp.java
--- ModuleExp.java	2001/08/18 01:31:11	1.20
+++ ModuleExp.java	2001/08/27 19:01:24
@@ -180,8 +180,8 @@
 	    ModuleBody mod = (ModuleBody) eval (env);
 	    gnu.kawa.reflect.ClassMemberConstraint.defineAll(mod, env);
 	    ctx.proc = mod;
-	    ctx.run();
 	  }
+	ctx.run();
       }
     finally
       {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]