[Mono-list] another bug in mcs I think

Erik Bågfors erik@bagfors.nu
07 Apr 2002 23:31:41 +0200


The following code doesn't compile (with cvs-version of mcs)

using System;

class TestClass {
    internal test() 
    {
	System.Console.WriteLine("test");
    }

    public static void Main() {
	System.Console.WriteLine("hello world");
    }
}


mcs     -o test.exe test.cs
./test.cs (12,8), Token:345   : Parsing error 
System.FormatException
The specified format is invalidSystem.FormatExceptionin
System.IntegerFormatter:NumberToString ()
in System.Int32:ToString ()
in System.String:Format ()
in System.String:Format ()
in Mono.CSharp.Report:Error ()
in Mono.CSharp.CSharpParser:CheckDef ()
in Mono.CSharp.CSharpParser:yyparse ()


(process:17614): ** WARNING **: unhandled exception
System.FormatException: "The specified format is invalid"
in System.IntegerFormatter:NumberToString ()
in System.Int32:ToString ()
in System.String:Format ()
in System.String:Format ()
in Mono.CSharp.Report:Error ()
in Mono.CSharp.Driver:MainDriver ()
in Mono.CSharp.Driver:Main ()


I assume it's ok C#-code since I found it in working code.

/Erik
-- 
Erik Bågfors               | erik@bagfors.nu
Supporter of free software | GSM +46 733 279 273
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32