In message "Re: [kaffe] Bytecode fails verification when anonymous class 
inherits inner class of another class."
    on 05/01/19, Ito Kazumitsu <[EMAIL PROTECTED]> writes:

> This problem must have something to do with kjc/kjc/JConstructorCall.java.

Although I am not sure what I am doing,  I have found that the attached
patch helps solve the problem.

I would be more confident if I could find a case where the "else" block
of the patched "if" works.

--- kjc/kjc/JConstructorCall.java.orig  Wed Jan 19 11:49:05 2005
+++ kjc/kjc/JConstructorCall.java       Thu Jan 20 19:02:55 2005
@@ -278,7 +278,7 @@
         /* If it is not qualified, the first*/
         var.setPosition(inClass.isQualifiedAndAnonymous() && 
!inClass.isStatic() && inClass.hasOuterThis() ? 2 : 1);
 
-        if ((whichOuterThis == null) || 
(whichOuterThis.getCClass().getOwnerType().getCClass().descendsFrom(owner.getOwner())))
 {
+        if ((whichOuterThis == null) || 
(whichOuterThis.getCClass().getOwnerType().getCClass().descendsFrom(owner.getOwner()))
 || (whichOuterThis.getCClass().descendsFrom(owner.getCClass()))) {
           new JLocalVariableExpression(TokenReference.NO_REF, 
var).genCode(context, false);
         } else {
           new JLocalVariableExpression(TokenReference.NO_REF, 
var).genCode(context, false);

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to