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]

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);

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