This is the mail archive of the java-prs@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj/317: static method can't have same name as base class



>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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]