2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git] / mcs / tests / test-189.cs
blob353c9ad41663fe893365ad62663de7a21df7eada
1 //
2 // Test to ensure proper overload resolution with params methods
3 //
4 // From bugs #46199 and #43367
5 //
6 using System;
8 class MyTest {
10 public static int Main (String[] args)
12 if (m (1, 2) != 0)
13 return 1;
15 MonoTest2 test = new MonoTest2 ();
16 if (test.method1 ("some message", "some string") != 0)
17 return 1;
19 return 0;
22 public static int m(int a, double b)
24 return 1;
27 public static int m(int x0, params int[] xr)
29 return 0;
33 public class MonoTest
35 public virtual int method1 (string message, params object[] args)
37 return 1;
40 public void testmethod ()
42 method1 ("some message", "some string");
46 public class MonoTest2 : MonoTest {
48 public override int method1 (string message, params object[] args)
50 return 0;
53 public void testmethod2 ()
55 method1 ("some message ", "some string");