public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/5935: problem with anonymous inner classes
@ 2002-03-16 17:11 bryce
0 siblings, 0 replies; 2+ messages in thread
From: bryce @ 2002-03-16 17:11 UTC (permalink / raw)
To: bryce, gcc-bugs, gcc-prs, java-prs, nobody, r.hautz
Synopsis: problem with anonymous inner classes
Responsible-Changed-From-To: unassigned->bryce
Responsible-Changed-By: bryce
Responsible-Changed-When: Sat Mar 16 17:11:36 2002
Responsible-Changed-Why:
.
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Sat Mar 16 17:11:36 2002
State-Changed-Why:
Patch checked in to mainline and branch.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5935
^ permalink raw reply [flat|nested] 2+ messages in thread
* java/5935: problem with anonymous inner classes
@ 2002-03-13 7:46 Roland Hautz, roland
0 siblings, 0 replies; 2+ messages in thread
From: Roland Hautz, roland @ 2002-03-13 7:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 5935
>Category: java
>Synopsis: problem with anonymous inner classes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Mar 13 07:46:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.2 20020303 (experimental)
>Organization:
>Environment:
System: Linux isabella 2.4.10-4GB #1 Tue Sep 25 12:33:54 GMT 2001 i586 unknown
Architecture: i586
host: i586-pc-linux-gnu
build: i586-pc-linux-gnu
target: i586-pc-linux-gnu
configured with: /home/roland/gcc/configure : (reconfigured) /home/roland/gcc/configure --enable-threads=posix --enable-shared --enable-languages=c++,java : (reconfigured) /home/roland/gcc/configure : (reconfigured) /home/roland/gcc/configure --disable-libf2c : (reconfigured) /home/roland/gcc/configure --enable-threads=posix --enable-languages=c,c++,java : (reconfigured) : (reconfigured) : (reconfigured) /home/roland/gcc/configure --enable-threads=posix --enable-languages=c,c++,java --enable-interpreter : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured) /home/roland/gcc/configure --enable-threads=posix --enable-languages=c,c++,java : (reconfigured) /home/roland/gcc/configure --enable-threads=posix --enable-languages=c,c++,java : (reconfigured) : (reconfigured) /home/roland/gcc/configure --enable-threads=posix --enable-language!
s=c,c++,java
>Description:
gcj rejects legal code of anonymous inner classes with the following error message
roland@isabella:~/work> gcj -C Test.java
IntProcedure.java: In class `Test$1':
IntProcedure.java: In constructor `(Test,int)':
IntProcedure.java:22: Local variable `parm$key' can't be accessed from within the inner class `Test$1' unless it is declared final.
<<file too short - unexpected EOF>>
^
IntProcedure.java:1: internal error in generate_bytecode_insn - tree code not implemented: error_mark
>How-To-Repeat:
public interface IntProcedure {
public int apply();
}
import IntProcedure;
public class Test {
public Object a(final int key) {
return new IntProcedure() {
public int apply() {
return key;
}
};
}
public Object b(final int value) {
return new IntProcedure() {
public int apply() {
return value;
}
};
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-17 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-16 17:11 java/5935: problem with anonymous inner classes bryce
-- strict thread matches above, loose matches on Subject: below --
2002-03-13 7:46 Roland Hautz, roland
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).