This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

java/4811: Incorrect error accessing non-existant outer field



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]