blob: 3023f6e9d1b2267955582a688e67a731857f600c (
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;
}
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;
}
}
|