From mboxrd@z Thu Jan 1 00:00:00 1970 From: bryce@albatross.co.nz To: java-gnats@sourceware.cygnus.com Subject: java/1217: Wrong scope for inner class variable declaration Date: Wed, 20 Dec 2000 12:22:00 -0000 Message-id: <20000314105958.26147.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg00995.html List-Id: >Number: 1217 >Category: java >Synopsis: Wrong scope for inner class variable declaration >Confidential: no >Severity: serious >Priority: medium >Responsible: apbianco >State: closed >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:17:48 PST 2000 >Closed-Date: Wed Mar 22 23:28:22 PST 2000 >Last-Modified: Wed Mar 22 23:30:00 PST 2000 >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: >Fix: Nice catch! Try with the proposed patch. >Release-Note: There is a new patch to cover 172, 174 and 176. See the ever changing patch submitted for the re-opened PR #172. >Audit-Trail: Formerly PR gcj/174 From: tromey@sourceware.cygnus.com To: java-gnats@sourceware.cygnus.com Cc: Subject: gcj/174 Date: 14 Mar 2000 18:35:02 -0000 CVSROOT: /cvs/java Module name: libgcj Changes by: tromey@sourceware.cygnus.com 00/03/14 10:35:02 Modified files: libjava/testsuite: ChangeLog Added files: libjava/testsuite/libjava.compile: pr174.java Log message: * libjava.compile/pr174.java: New file, for PR gcj/174. Patches: http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/ChangeLog.diff?cvsroot=java&r1=1.67&r2=1.68 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/libjava.compile/pr174.java.diff?cvsroot=java&r1=NONE&r2=1.1 State-Changed-From-To: open->feedback State-Changed-By: apbianco State-Changed-When: Wed Mar 15 01:16:22 2000 State-Changed-Why: I proposed a patch. From: apbianco@cygnus.com To: apbianco@cygnus.com, bryce@albatross.co.nz, java-gnats@sourceware.cygnus.com Cc: Subject: Re: gcj/174 Date: 15 Mar 2000 09:16:22 -0000 Synopsis: Wrong scope for inner class variable declaration State-Changed-From-To: open->feedback State-Changed-By: apbianco State-Changed-When: Wed Mar 15 01:16:22 2000 State-Changed-Why: I proposed a patch. http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=174&database=java From: Bryce McKinlay To: apbianco@cygnus.com Cc: java-gnats@sourceware.cygnus.com Subject: Re: gcj/174 Date: Thu, 16 Mar 2000 00:34:41 +1300 The patch works fine. [ bryce ] From: Alexandre Petit-Bianco To: java-gnats@sourceware.cygnus.com Cc: Subject: Re: gcj/174 Date: Wed, 15 Mar 2000 14:52:05 -0800 (PST) Bryce McKinlay writes: > The following reply was made to PR gcj/174; it has been noted by GNATS. > > From: Bryce McKinlay > To: apbianco@cygnus.com > Cc: java-gnats@sourceware.cygnus.com > Subject: Re: gcj/174 > Date: Thu, 16 Mar 2000 00:34:41 +1300 > > The patch works fine. Thanks. I'm going to check in one and only one fix for the PR 172, 174 and 176, since they're all stemming from the same problem. ./A State-Changed-From-To: feedback->closed State-Changed-By: apbianco State-Changed-When: Wed Mar 22 23:28:22 2000 State-Changed-Why: I checked in a patch to fix the bug: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00790.html From: apbianco@cygnus.com To: apbianco@cygnus.com, bryce@albatross.co.nz, java-gnats@sourceware.cygnus.com Cc: Subject: Re: gcj/174 Date: 23 Mar 2000 07:28:22 -0000 Synopsis: Wrong scope for inner class variable declaration State-Changed-From-To: feedback->closed State-Changed-By: apbianco State-Changed-When: Wed Mar 22 23:28:22 2000 State-Changed-Why: I checked in a patch to fix the bug: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00790.html http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=174&database=java >Unformatted: