[Bug java/23655] New: [3.4/4.0/4.1 Regression] Accepts invalid
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 31 15:34:00 GMT 2005
We accept the following invalid code from 3.4.0 and above:
interface A { void methA(); }
class B implements A{
void methA() { }
}
We used to error out with:
B.java:4: error: Class `B' must override `B.methA()' with a public method in order to implement
interface `A'.
void methA() { }
^
1 error
Which is correct.
Sun's 1.4.0 javac gives:
B.java:3: methA() in B cannot implement methA() in A; attempting to assign weaker access privileges;
was public
class B implements A{
^
1 error
--
Summary: [3.4/4.0/4.1 Regression] Accepts invalid
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
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=23655
More information about the Gcc-bugs
mailing list