1 Reply Latest reply on Jul 8, 2004 1:22 AM by brett_s_r

    CtNewMethod on static fields, bug submitted

    brett_s_r Newbie

      See http://sourceforge.net/tracker/?func=detail&aid=987038&group_id=22866&atid=376685. A failing TestCase is provided.

      I notice that the code deliberately treats statics differently:

      if ((finfo.getAccessFlags() & AccessFlag.STATIC) == 0) {
       code.addLoad(1, field.getType());
       code.addPutfield(Bytecode.THIS, fieldName, fieldType);
       else {
       code.addLoad(0, field.getType());
       code.addPutstatic(Bytecode.THIS, fieldName, fieldType);

      Any ideas what the problem could be?


      Brett Randall