This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: one more compile error
- From: Per Bothner <per at bothner dot com>
- To: Vladimir Tsichevski <wowa at jet dot msk dot su>
- Cc: kawa at sources dot redhat dot com
- Date: Mon, 28 Apr 2003 12:07:14 -0700
- Subject: Re: one more compile error
- References: <3E79F3D4.2000609@jet.msk.su>
Vladimir Tsichevski wrote:
Hi,
this expression:
(define (create-main-frame)
(object ()
(myField init-form:
(format #t "this: ~a\n" (this))
)))
compiles to:
Internal error while compiling
/jet/wowa/Projects/BMC/BMCConsole/src/bug.scm:5
java.lang.NullPointerException
at gnu.bytecode.PrimType.compare(PrimType.java:186)
I checked in the attached patch, as well as a testcase.
--
--Per Bothner
per at bothner dot com http://per.bothner.com/
Index: ChainLambdas.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/ChainLambdas.java,v
retrieving revision 1.7
diff -u -r1.7 ChainLambdas.java
--- ChainLambdas.java 24 Jul 2002 06:33:44 -0000 1.7
+++ ChainLambdas.java 28 Apr 2003 18:59:33 -0000
@@ -73,7 +73,7 @@
}
protected Expression walkClassExp (ClassExp exp)
- {
+ {
LambdaExp parent = currentLambda;
if (parent != null && ! (parent instanceof ClassExp))
{
@@ -83,14 +83,6 @@
walkScopeExp(exp);
- // Give name to object class.
- exp.getCompiledClassType(comp);
- comp.addClass(exp.type);
- if (exp.isMakingClassPair())
- {
- exp.instanceType.setName(exp.type.getName()+"$class");
- comp.addClass(exp.instanceType);
- }
return exp;
}
}
Index: InlineCalls.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/InlineCalls.java,v
retrieving revision 1.10
diff -u -r1.10 InlineCalls.java
--- InlineCalls.java 24 Feb 2003 06:01:47 -0000 1.10
+++ InlineCalls.java 28 Apr 2003 18:59:33 -0000
@@ -154,4 +154,17 @@
}
return exp;
}
+
+ protected Expression walkClassExp (ClassExp exp)
+ {
+ // Give name to object class.
+ exp.getCompiledClassType(comp);
+ comp.addClass(exp.type);
+ if (exp.isMakingClassPair())
+ {
+ exp.instanceType.setName(exp.type.getName()+"$class");
+ comp.addClass(exp.instanceType);
+ }
+ return super.walkClassExp(exp);
+ }
}