This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/14979] gcj doesn't handle package private methods with differing return types properly
- From: "wasabi at larvalstage dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 8 Jan 2005 04:53:58 -0000
- Subject: [Bug java/14979] gcj doesn't handle package private methods with differing return types properly
- References: <20040416174634.14979.ovidr@users.sourceforge.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wasabi at larvalstage dot net 2005-01-08 04:53 -------
Are you sure this is a bug?
Quote from the JLS:
http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html
8.4.6.3 Requirements in Overriding and Hiding
If a method declaration overrides or hides the declaration of another method,
then a compile-time error occurs if they have different return types or if one
has a return type and the other is void. Moreover, a method declaration must not
have a throws clause that conflicts (§8.4.4) with that of any method that it
overrides or hides; otherwise, a compile-time error occurs.
That tells me that a compile time error SHOULD occure because the return types
are different.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14979