Patch: RFA: Fix PR java/21844

Andrew Haley aph@redhat.com
Tue Jun 7 11:41:00 GMT 2005


Tom Tromey writes:
 > This fixes PR java/21844.
 > 
 > The problem occurs if we are making an outer reference to an inherited
 > field.  In this case nested_field_access_p incorrectly returned false,
 > and as a result we referenced the field against 'this' rather than
 > 'this$0'.  (Seems like this could be caught by type checking code in
 > some later pass, were it to exist.)
 > 
 > Tested on x86 FC2 including jacks.  Test case included.  Ok?
 > 
 > Tom
 > 
 > Index: libjava/ChangeLog
 > from  Tom Tromey  <tromey@redhat.com>
 > 
 > 	PR java/21844:
 > 	* testsuite/libjava.lang/pr21844.java: New file.
 > 	* testsuite/libjava.lang/pr21844.out: New file.
 > 
 > Index: gcc/java/ChangeLog
 > from  Tom Tromey  <tromey@redhat.com>
 > 
 > 	PR java/21844:
 > 	* parse.y (nested_field_access_p): Handle case where outer field
 > 	is inherited by enclosing class.

Yes.  Please test with branch too.

Andrew.



More information about the Java-patches mailing list