This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/21818] New: "Methods can't be overridden to be more private."
- From: "timo dot lindfors at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 May 2005 14:14:50 -0000
- Subject: [Bug java/21818] New: "Methods can't be overridden to be more private."
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Steps to reproduce:
1. Compile they attached testcase with gcj -C DoubleClickJList.java
Expected results:
1. DoubleClickJList.class is created and no errors are shown.
Actual results:
$ /home/lindi/installdir-2005-05-22/gcc/bin/gcj -C DoubleClickJList.java
DoubleClickJList.java:3: error: Methods can't be overridden to be more private.
Method 'DoubleClickJList.init()' is not private in class 'javax.swing.JList'.
private void init() {
^
1 error
Testcase:
import javax.swing.*;
public class DoubleClickJList extends JList {
private void init() {
}
}
I am not sure if this is a bug or a feature (I have not read any official specs)
but jikes 1.22 and SUN's JVM 1.5.0 seem to compile the testcase just fine. This
means that some free software projects seem to depend on this behavior.
Version info:
gcj (GCC) 4.1.0 20050522 (experimental)
Fedora Core with linux 2.6.11-1.14_FC3
--
Summary: "Methods can't be overridden to be more private."
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: timo dot lindfors at iki dot fi
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21818