New test.
authorMarek Safar <marek.safar@gmail.com>
Wed, 9 May 2007 22:29:33 +0000 (22:29 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 9 May 2007 22:29:33 +0000 (22:29 -0000)
svn path=/trunk/mcs/; revision=77096

mcs/tests/gtest-334.cs [new file with mode: 0644]

diff --git a/mcs/tests/gtest-334.cs b/mcs/tests/gtest-334.cs
new file mode 100644 (file)
index 0000000..37e5ac0
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+
+public class Test
+{
+       public delegate void DelegateA (bool b);
+       public delegate int DelegateB (int i);
+
+       static DelegateA dt;
+       static DelegateB dt2;
+
+       public static int Main ()
+       {
+               bool b = DelegateMethod == dt;
+               if (b)
+                       return 1;
+
+               b = DelegateMethod != dt;
+               if (!b)
+                       return 2;
+
+               b = dt2 == DelegateMethod;
+               if (b)
+                       return 3;
+
+               Console.WriteLine ("OK");
+               return 0;
+       }
+
+       static void DelegateMethod (bool b)
+       {
+       }
+
+       static int DelegateMethod (int b)
+       {
+               return 4;
+       }
+}
+
+