This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: New Miscompilation Into Bytecode Error
>>>>> "Stephan" == sf <sf@b-i-t.de> writes:
>> Hello$1$Local(Hello,int,int);
>> Code:
>> 0: aload_0
>> 1: aload_1
>> 2: putfield #14; //Field this$0:LHello;
Stephan> The initializer must be called first (I think).
There's actually a special case for assignment to fields declared in
this class -- you can have those assignments before the super call.
This was introduced to let constructors set up `this$0' and friends so
that other methods called by the constructor wouldn't fail with a
cryptic NullPointerException.
Tom