This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: RFA: Fix PR java/21844
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 7 Jun 2005 11:35:05 +0100
- Subject: Re: Patch: RFA: Fix PR java/21844
- References: <m37jh7utry.fsf@localhost.localdomain>
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.