This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Compilation error: hyphenated class names again?
- From: Per Bothner <per at bothner dot com>
- To: Jocelyn Paine <popx at ifs dot org dot uk>
- Cc: kawa at sources dot redhat dot com
- Date: Wed, 21 Aug 2002 09:45:29 -0700
- Subject: Re: Compilation error: hyphenated class names again?
- References: <Pine.LNX.4.21.0208211146590.10898-100000@pop3.ifs.org.uk>
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;
}