public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/6464: in anonymous class, static member class of enclosing class's parent not found
@ 2002-04-25 17:46 Andrew Pimlott
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pimlott @ 2002-04-25 17:46 UTC (permalink / raw)
  To: gcc-gnats, debian-gcc


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: java/6464: in anonymous class, static member class of enclosing class's parent not found
@ 2002-04-30  8:10 mark
  0 siblings, 0 replies; 2+ messages in thread
From: mark @ 2002-04-30  8:10 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, nobody, pimlott

Synopsis: in anonymous class, static member class of enclosing class's parent not found

State-Changed-From-To: open->closed
State-Changed-By: mark
State-Changed-When: Tue Apr 30 08:10:25 2002
State-Changed-Why:
    Tried the example with gcj from the 3.1 branch in CVS which compiles it correctly. GCC 3.1 will hopefully be available in a couple of days/weeks.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6464


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-30 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 17:46 java/6464: in anonymous class, static member class of enclosing class's parent not found Andrew Pimlott
2002-04-30  8:10 mark

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).