This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
void run() (was: re-write of Kawa macro handling)
The run(CallContext) method that the Kawa generates for each compiled
module is static, but the ModuleBody class (which is the parent class
of the generated module) has a non-static run(CallContext) method.
I guess that shouldn't matter, but the jikes Java compiler I use to
compile my application is confused by this. The easiest way to see
this is to compile the (admittedly questionable) code below. If you
do you'll get this error from jikes:
Found 1 semantic error compiling "Bar.java":
1. public class Bar {
^-^
*** Semantic Error: The static method "void
run(gnu.mapping.CallContext $1);" cannot hide the accessible
instance method "void run(gnu.mapping.CallContext $1) throws
java.lang.Throwable;" declared in type "gnu.expr.ModuleBody".
Regards,
Chris Dean
--- /dev/null Tue Sep 14 23:30:46 2004
+++ Foo.scm Tue Nov 9 21:52:11 2004
@@ -0,0 +1,4 @@
+(module-name <Foo>)
+(module-static #t)
+
+(define (add1 x) (+ x 1))
--- /dev/null Tue Sep 14 23:30:46 2004
+++ Bar.java Tue Nov 9 22:03:46 2004
@@ -0,0 +1,5 @@
+public class Bar {
+ public void m() {
+ Foo.add1( null );
+ }
+}