This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
gcj/317: static method can't have same name as base class
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/317: static method can't have same name as base class
- From: bryce at albatross dot co dot nz
- Date: 16 Aug 2000 01:43:00 -0000
- Reply-To: bryce at albatross dot co dot nz
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, bryce@albatross.co.nz
>Number: 317
>Category: gcj
>Synopsis: static method can't have same name as base class
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 15 18:50:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Bryce McKinlay
>Release: current
>Organization:
>Environment:
>Description:
The following legal Java code does not compile with gcj:
class Constructor {}
class Sub extends Constructor
{
static void Constructor() {}
}
$ gcj -C Constructor.java
Constructor.java:8: Instance methods can't be overriden by a static method. Method `<init>()' is an instance method in class `Constructor'.
static void Constructor() {}
^
1 error
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: