Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80177 --- shadow/80177 2006-12-07 09:50:40.000000000 -0500 +++ shadow/80177.tmp.22728 2006-12-07 09:50:40.000000000 -0500 @@ -0,0 +1,58 @@ +Bug#: 80177 +Product: Mono: Compilers +Version: 1.2 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: gmcs does not compile code when csc does! + +CASE1: + public delegate T XXX<T>(); + + class Program + { + static void Main(string[] args) + { + Int32 zz = new XXX<Int32>(delegate() { return 999; })(); + Console.WriteLine(zz); + } + } + +gmcs does not compile it. output: + +error CS0031: Constant value `999' cannot be converted to a `T' +error CS0031: Constant value `999' cannot be converted to a `T' + + +csc.exe compiles it, no warnings or errors. executed performs like +expected. + + +CASE2: + public delegate T XXX<T>(T t); + + class Program + { + static void Main(string[] args) + { + int zz = new XXX<int>(delegate(int t) { return t; })(999); + Console.WriteLine(zz); + } + } + +gmcs does not compile it. output: +error CS1678: Parameter `1' is declared as type `int' but should be `T' + + +csc.exe compiles it, no warnings or errors. executed performs like +expected. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
