blob: f21cb71a83f6481f92f6910078a3b2b8d48b463e (
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
|
using System;
class X {
bool sbyte_selected;
bool int_selected;
void test (sbyte s)
{
sbyte_selected = true;
}
void test (int i)
{
int_selected = true;
}
public static int Main ()
{
X x = new X ();
x.test (1);
if (x.sbyte_selected){
Console.WriteLine ("FAILED: Sbyte selected on constant int argument");
return 1;
} else {
Console.WriteLine ("OK: int selected for constant int");
}
X y = new X ();
sbyte s = 10;
y.test (s);
if (y.sbyte_selected){
Console.WriteLine ("OK: sbyte selected for sbyte argument");
} else {
Console.WriteLine ("FAILED: sbyte not selected for sbyte argument");
return 1;
}
return 0;
}
}
|