This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/174: Wrong scope for inner class variable declaration
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/174: Wrong scope for inner class variable declaration
- From: bryce at albatross dot co dot nz
- Date: 14 Mar 2000 10:59:58 -0000
- Reply-To: bryce at albatross dot co dot nz
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, bryce@albatross.co.nz
>Number: 174
>Category: gcj
>Synopsis: Wrong scope for inner class variable declaration
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 14 03:00:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay
>Release: gcc version 2.96 20000313 (experimental)
>Organization:
>Environment:
Linux
>Description:
The following test fails with
"Scope3.java:14: Incompatible type for declaration. Can't convert `Scope3$A' to `A'."
It appears that gcj sees the correct (inner) class for the
constructor call, but the wrong (top-level) class for the
variable declaration.
class A
{
}
public class Scope3
{
public static void main(String args[])
{
new Scope3();
}
public Scope3()
{
A a = new A();
}
class A
{}
}
>How-To-Repeat:
Try to compile the test case
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: