Author: marek
Date: 2007-10-31 10:05:32 -0500 (Wed, 31 Oct 2007)
New Revision: 88558

Added:
   trunk/mcs/errors/cs0123-3.cs
   trunk/mcs/errors/cs0407-2.cs
Modified:
   trunk/mcs/errors/cs0407.cs
Log:
New tests.



Added: trunk/mcs/errors/cs0123-3.cs
===================================================================
--- trunk/mcs/errors/cs0123-3.cs        2007-10-31 15:04:46 UTC (rev 88557)
+++ trunk/mcs/errors/cs0123-3.cs        2007-10-31 15:05:32 UTC (rev 88558)
@@ -0,0 +1,21 @@
+// CS0123: The method `X.f1(int, object)' parameters do not match delegate 
`bool X.Function(int, int)' parameters
+// Line: 13
+
+using System;
+
+class X
+{
+       public delegate bool Function(int arg1, int arg2);
+
+       static void Main ()
+       {
+               Delegate [] d = new Delegate [] {
+                       new Function (f1),
+               };
+       }
+
+       static bool f1 (int a, object b)
+       {
+               return false;
+       }
+}


Property changes on: trunk/mcs/errors/cs0123-3.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0407-2.cs
===================================================================
--- trunk/mcs/errors/cs0407-2.cs        2007-10-31 15:04:46 UTC (rev 88557)
+++ trunk/mcs/errors/cs0407-2.cs        2007-10-31 15:05:32 UTC (rev 88558)
@@ -0,0 +1,19 @@
+// CS0407: The method `int X.f(int)' return type does not match delegate 
`object X.Function(int)' return type
+// Line: 17
+
+using System;
+
+class X
+{
+       public delegate object Function(int arg1);
+
+       static void Main ()
+       {
+               Delegate d = new Function (f);
+       }
+
+       static int f (int a)
+       {
+               return 1;
+       }
+}


Property changes on: trunk/mcs/errors/cs0407-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0407.cs
===================================================================
--- trunk/mcs/errors/cs0407.cs  2007-10-31 15:04:46 UTC (rev 88557)
+++ trunk/mcs/errors/cs0407.cs  2007-10-31 15:05:32 UTC (rev 88558)
@@ -1,4 +1,4 @@
-// cs0407.cs: `int MainClass.Delegate()' has the wrong return type to match 
the delegate `void TestDelegate()'
+// CS0407: The method `int MainClass.Delegate()' return type does not match 
delegate `void TestDelegate()' return type
 // Line: 12
 
 delegate void TestDelegate();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to