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
58
59
60
61
62
63
64
|
using System;
public class C
{
public static int Main ()
{
int s = Error ("{0} - {0}", "a");
Console.WriteLine (s);
if (s != 2)
return 1;
s = Test_A ("aaaa");
if (s != 1)
return 2;
s = Test_C (typeof (C), null, null);
Console.WriteLine (s);
if (s != 2)
return 3;
return 0;
}
static public int Error (string format, params object[] args)
{
return Format (format, args);
}
static int Format (string s, object o)
{
return 1;
}
static int Format (string s, params object[] o)
{
return 2;
}
static int Format (string s, object o, params object[] o2)
{
return 3;
}
static int Test_A (string s)
{
return 1;
}
static int Test_A (string s, params object[] o)
{
return 2;
}
static int Test_C (Type t, params int[] a)
{
return 1;
}
static int Test_C (Type t, int[] a, int[] b)
{
return 2;
}
}
|