From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30649 invoked by alias); 8 Jan 2005 04:53:59 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 30631 invoked by uid 48); 8 Jan 2005 04:53:58 -0000 Date: Sat, 08 Jan 2005 04:53:00 -0000 Message-ID: <20050108045358.30629.qmail@sourceware.org> From: "wasabi at larvalstage dot net" To: java-prs@gcc.gnu.org In-Reply-To: <20040416174634.14979.ovidr@users.sourceforge.net> References: <20040416174634.14979.ovidr@users.sourceforge.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/14979] gcj doesn't handle package private methods with differing return types properly X-Bugzilla-Reason: CC X-SW-Source: 2005-q1/txt/msg00039.txt.bz2 List-Id: ------- 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