This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
java/4811: Incorrect error accessing non-existant outer field
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/4811: Incorrect error accessing non-existant outer field
- From: bryce at gcc dot gnu dot org
- Date: 7 Nov 2001 02:50:10 -0000
- Reply-To: bryce at gcc dot gnu dot org
>Number: 4811
>Category: java
>Synopsis: Incorrect error accessing non-existant outer field
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 06 18:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay
>Release: trunk
>Organization:
>Environment:
>Description:
The following test case reports the wrong error message:
public class Local2
{
class I
{
void j()
{
int i = q;
}
}
}
$ gcj -c Local2.java
Local2.java: In class `Local2$I':
Local2.java: In method `Local2$I.j()':
Local2.java:7: Local variable `q' can't be accessed from within the inner class `Local2$I' unless it is declared final.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: