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]

[Bug java/26095] New: variable access directed to class of different scope


// this should not compile
package samename;

public class WrongScope
{
    public int v1 ()
    {
        class SingleName
        {
            int v1 = 1;
        }
        // Should not compile.
        return new SingleName ().v2;
    }
    public int v2 ()
    {
        class SingleName
        {
            int v2 = 2;
        }
        return new SingleName ().v2;
    }
}


-- 
           Summary: variable access directed to class of different scope
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cagney at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26095


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