java/8893: Local classes are named incorrectly
gbenson@redhat.com
gbenson@redhat.com
Tue Dec 10 10:26:00 GMT 2002
>Number: 8893
>Category: java
>Synopsis: Local classes are named incorrectly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 10 10:26:08 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: gbenson@redhat.com
>Release: gcc-3.2 patched for PR 1343
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
The fix for PR 1343 is broken: although the names of local classes are prepended by a number, only one counter is used per source file. For example, the following code:
| public class Test {
| public void func1() {
| class Foo {
| }
| class Bar {
| }
| }
| public void func2() {
| class Foo {
| }
| }
| }
compiles to Test.class, Test$1$Foo.class, Test$2$Bar.class and Test$3$Foo.class instead of Test.class, Test$1$Foo.class, Test$1$Bar.class and Test$2$Foo.class.
>How-To-Repeat:
gcj Test.java # attached
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="Test.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Test.java"
cHVibGljIGNsYXNzIFRlc3QgewogICAgcHVibGljIHZvaWQgZnVuYzEoKSB7CgljbGFzcyBGb28g
ewoJfQoJY2xhc3MgQmFyIHsKCX0KICAgIH0KICAgIHB1YmxpYyB2b2lkIGZ1bmMyKCkgewoJY2xh
c3MgRm9vIHsKCX0KICAgIH0KfQo=
More information about the Java-prs
mailing list