This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/26095] New: variable access directed to class of different scope
- From: "cagney at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2006 23:33:42 -0000
- Subject: [Bug java/26095] New: variable access directed to class of different scope
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
// 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