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]
Other format: [Raw text]

Re: Compilation error: hyphenated class names again?


Jocelyn Paine wrote:
when I compile, Kawa crashes, I think on the function:

[d:\kb7\mm3\general]java kawa.repl -d \. -P kb7.mm3.general. -C test.scml
(compiling test.scm)
test.scm:15:2: internal error while compiling - caught: java.lang.NullPointerException
java.lang.NullPointerException
at kawa.standard.Scheme.getTypeFor(Scheme.java:925)
at gnu.kawa.reflect.SlotGet.compile(SlotGet.java:250)
Nothing to do with hyphenated class names.  Rather it has to do
with the code to map generic machine types to language-specific
types; this code doesn't work for "new" classes.

I've attached a simple patch.  I haven't decided if it's the
"correct" patch.  (An alternative is to test isExisting.)
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/
--- SlotGet.java~	Sun Jul 21 23:31:36 2002
+++ SlotGet.java	Wed Aug 21 08:20:59 2002
@@ -247,7 +247,9 @@
 		&& (modifiers & Access.FINAL) != 0)
 	      code.emitInvokeVirtual(Compilation.getLocationMethod);
 	    Interpreter interpreter = Interpreter.getInterpreter();
-	    ftype = interpreter.getTypeFor(ftype.getReflectClass());
+	    Class fclass = ftype.getReflectClass();
+	    if (fclass != null)
+	      ftype = interpreter.getTypeFor(fclass);
 	    target.compileFromStack(comp, ftype);
             return;
           }

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