public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pimlott <pimlott@idiomtech.com>
To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org
Subject: java/6464: in anonymous class, static member class of enclosing class's parent not found
Date: Thu, 25 Apr 2002 17:46:00 -0000	[thread overview]
Message-ID: <E170mfC-0000Mc-00@techloaner2.idiomtech.com> (raw)


>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:


             reply	other threads:[~2002-04-26  0:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-25 17:46 Andrew Pimlott [this message]
2002-04-30  8:10 mark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E170mfC-0000Mc-00@techloaner2.idiomtech.com \
    --to=pimlott@idiomtech.com \
    --cc=debian-gcc@lists.debian.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).