public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1312: can't able access private fields in inner class
@ 2000-12-20 12:24 osk
0 siblings, 0 replies; only message in thread
From: osk @ 2000-12-20 12:24 UTC (permalink / raw)
To: java-gnats
>Number: 1312
>Category: java
>Synopsis: can't able access private fields in inner class
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 12:18:56 PST 2000
>Closed-Date: Thu Dec 14 20:27:21 PST 2000
>Last-Modified: Thu Dec 14 20:30:01 PST 2000
>Originator: Oskar Liljeblad
>Release: unknown-1.0
>Organization:
>Environment:
egcs 2000-07-17 with various patches from here
>Description:
Compiling this code
class Outer {
public class Inner {
private int field;
}
void someMethod() {
Inner s = new Inner();
s.field = 5;
}
}
with gcj -C gives
test.java: In class `Outer':
test.java: In method `someMethod()':
test.java:7: Can't access private field `Outer$Inner.field' from `Outer'.
s.field = 5;
^
1 error
while jikes/javac compiles it just fine. Note that private
fields in static inner classes should also be accessible
from the outer class.
Oskar Liljeblad (osk@hem.passagen.se)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Formerly PR gcj/290
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Thu Dec 14 20:27:21 2000
State-Changed-Why:
This has been fixed in the current cvs compiler.
From: bryce@albatross.co.nz
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:
Subject: Re: gcj/290
Date: 15 Dec 2000 04:27:21 -0000
Synopsis: can't able access private fields in inner class
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Thu Dec 14 20:27:21 2000
State-Changed-Why:
This has been fixed in the current cvs compiler.
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=290&database=java
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-20 12:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:24 java/1312: can't able access private fields in inner class osk
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).