This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
a new bug when compiling object statement, patch candidate included
- From: Vladimir Tsichevski <wowa at jet dot msk dot su>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Fri, 28 Mar 2003 14:03:57 +0300
- Subject: a new bug when compiling object statement, patch candidate included
Hi,
found a bug preventing compilation of the following code
(NullPointerException has thrown):
(define (methodFunc tabbedPane)
"something")
(define-simple-class TestClass ()
(aField)
(menuBar init-form:
(invoke
o
'ttt
(object ()
((aMethod)
(methodFunc aField))))))
I provide a patch which at least allows the compilation and PROBABLY (!)
creates right codes.
Regards,
Vladimir
Index: gnu/expr/ObjectExp.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/ObjectExp.java,v
retrieving revision 1.21
diff -r1.21 ObjectExp.java
32c32,35
< code.emitLoad(closureEnv);
---
> if (closureEnv == null)
> code.emitPushThis();
> else
> code.emitLoad(closureEnv);