From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18969 invoked by alias); 26 Apr 2002 00:46:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18936 invoked by uid 71); 26 Apr 2002 00:46:02 -0000 Resent-Date: 26 Apr 2002 00:46:01 -0000 Resent-Message-ID: <20020426004601.18935.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, Andrew Pimlott Received:(qmail 16795 invoked from network); 26 Apr 2002 00:44:05 -0000 Received: from unknown (HELO techloaner2.idiomtech.com) (24.91.58.12) by sources.redhat.com with SMTP; 26 Apr 2002 00:44:05 -0000 Received: from pimlott by techloaner2.idiomtech.com with local (Exim 3.35 #1 (Debian)) id 170mfC-0000Mc-00; Thu, 25 Apr 2002 13:04:10 -0400 Message-Id: Date: Thu, 25 Apr 2002 17:46:00 -0000 From: Andrew Pimlott To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org X-Send-Pr-Version:3.113 Subject: java/6464: in anonymous class, static member class of enclosing class's parent not found X-SW-Source: 2002-04/txt/msg01384.txt.bz2 List-Id: >Number: 6464 >Category: java >Synopsis: in anonymous class, static member class of enclosing class's parent not found >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Apr 25 17:46:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Andrew Pimlott >Release: 3.0.4 (Debian testing/unstable) >Organization: >Environment: System: Linux techloaner2 2.4.18-rc1techloaner2+ipsec #1 Sun Feb 17 12:37:21 EST 2002 i686 unknown Architecture: i686 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux >Description: gcj fails to find a type that should (I think) be visible. javac and jikes compile the code successfully. gcj compiles some variations of this code correctly, so I'm not sure of the exact problem. >How-To-Repeat: Test case: class Test extends Best { { new Object() { public void foo() { Rest r; } }; } } class Best { protected static class Rest { } } Output: Test.java:5: Type `Rest' not found in the declaration of the local variable `r'. Rest r; ^ 1 error I could not find a simpler failure case. Rest can normally be accessed from within Test, as expected. It seems to be only within a block in the anonymous class that there is a problem. For example, a member variable in the anonymous class of type Rest is ok. >Fix: >Release-Note: >Audit-Trail: >Unformatted: