2002-09-06 Ravi Pratap <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Fri, 6 Sep 2002 19:34:24 +0000 (19:34 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Fri, 6 Sep 2002 19:34:24 +0000 (19:34 -0000)
* test-163.cs : Add test to check we select string
over object when we have a Null literal as the argument.

* makefile : Update.

svn path=/trunk/mcs/; revision=7287

mcs/tests/ChangeLog
mcs/tests/makefile
mcs/tests/test-163.cs [new file with mode: 0644]

index 4a4458f0d2f5f279ff0c4ab3f8fb92fbaa43bb8b..ca66cade8333faa89a22353cdbd313348adec359 100755 (executable)
@@ -1,3 +1,10 @@
+2002-09-06  Ravi Pratap  <ravi@ximian.com>
+
+       * test-163.cs : Add test to check we select string
+       over object when we have a Null literal as the argument.
+
+       * makefile : Update.
+
 2002-08-11  Martin Baulig  <martin@gnome.org>
 
        * test-162.cs: New test.
index 52eb8170b1b3fa98345a1850767c040feff199f8..860300937407616af5c874a603f6f2bd2611ab82 100755 (executable)
@@ -25,7 +25,7 @@ TEST_SOURCES = \
        test-131                   test-134 test-135 test-136 test-137 test-138 test-139 test-140 \
        test-141 test-142 test-143 test-144 test-145 test-146 test-147 test-148 test-149 test-150 \
                          test-153 test-154 test-155 test-156 test-157 test-158 test-159 test-160 \
-       test-161 test-162
+       test-161 test-162 test-163
 
 UNSAFE_SOURCES = \
        unsafe-1 unsafe-2 unsafe-3 test-58.cs
diff --git a/mcs/tests/test-163.cs b/mcs/tests/test-163.cs
new file mode 100644 (file)
index 0000000..67674b9
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+
+public class Blah {
+
+       static int Foo (string s)
+       {
+               return 2;
+       }
+
+       static int Foo (object o)
+       {
+               return 1;
+       }
+
+       public static int Main ()
+       {
+               int i = Foo (null);
+
+               if (i == 1) {
+                       Console.WriteLine ("Wrong method ");
+                       return 1;
+               }
+               
+               return 0;
+       }
+
+}
+
+
+