Hi Jonathan, It seems you're right. Your second Main method doesn't qualify as an entry point, so it should indeed compile according to the specs. I checked again, and mcs does in fact compile correctly, it only gives a warning.
See attachment for a fix for mono.
mcs/errors/cs0028.cs:
added
mcs/mcs/class.cs:
added method Report28
warning: program has more than one entry point
added method IsEntryPoint
implements paragraph 10.1 of the spec
modified method Method.Define, the part at the end of the method
mcs/mcs/typemanager.cs:
modified method CSharpName
allow arrays of primitive type to be printed nicely
(e.g. instead of System.String[][] it now prints string[][])
added method CSharpSignature
returns the signature of a method in string format to be
used in reporting errors, warnings, etc.
mcs/mcs/rootcontext.cs:
added static public Location EntryPointLocation;
Greets,
Lawrence Pit
> > ----- Original Message -----
> > From: "Jonathan Stowe" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, April 16, 2002 22:15
> > Subject: [Mono-list] entry point bug ?
> >
> >
> > > This reveals a bug against the specification (as far as I understand
it)
> > > but I will check against csc before I put it in bugzilla :
> > >
> > > public class Test
> > > {
> > > static void Main()
> > > {
> > > System.Console.WriteLine("void Main()");
> > > }
> > >
> > > static void Main(string[] args,int foo)
> > > {
> > > System.Console.WriteLine("void Main(string[] args, int foo )");
> > > }
> > >
> > > }
file.diff
Description: Binary data
cs0028.cs
Description: Binary data
