This is the mail archive of the java-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: Patch to fix PR9861


>>>>> "TJ" == TJ Laurenzo <tlaurenzo@gmail.com> writes:

>> Also, constructors have no encoded return type.  I guess that's OK,
>> but I was rather surprised.

TJ> The decision to exclude return types on constructors was based on a
TJ> list of C++  rules for excluding return types for members of template
TJ> classes.

It is weird, but valid, to have a method with the class' name in java.
Would we get a symbol clash for a class like this?

    public class Weird {
      public Weird (int x) { /* constructor */ }
      public int Weird() { return 5; /* method */ }
    }

Tom


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