blob: 353c9ad41663fe893365ad62663de7a21df7eada (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
//
// Test to ensure proper overload resolution with params methods
//
// From bugs #46199 and #43367
//
using System;
class MyTest {
public static int Main (String[] args)
{
if (m (1, 2) != 0)
return 1;
MonoTest2 test = new MonoTest2 ();
if (test.method1 ("some message", "some string") != 0)
return 1;
return 0;
}
public static int m(int a, double b)
{
return 1;
}
public static int m(int x0, params int[] xr)
{
return 0;
}
}
public class MonoTest
{
public virtual int method1 (string message, params object[] args)
{
return 1;
}
public void testmethod ()
{
method1 ("some message", "some string");
}
}
public class MonoTest2 : MonoTest {
public override int method1 (string message, params object[] args)
{
return 0;
}
public void testmethod2 ()
{
method1 ("some message ", "some string");
}
}
|