Fix bug #566087.
[mcs.git] / tests / test-4.cs
blob3023f6e9d1b2267955582a688e67a731857f600c
1 using System;
2 class X {
3 bool sbyte_selected;
4 bool int_selected;
6 void test (sbyte s)
8 sbyte_selected = true;
11 void test (int i)
13 int_selected = true;
16 static int Main ()
18 X x = new X ();
20 x.test (1);
21 if (x.sbyte_selected){
22 Console.WriteLine ("FAILED: Sbyte selected on constant int argument");
23 return 1;
24 } else {
25 Console.WriteLine ("OK: int selected for constant int");
28 X y = new X ();
29 sbyte s = 10;
31 y.test (s);
32 if (y.sbyte_selected){
33 Console.WriteLine ("OK: sbyte selected for sbyte argument");
34 } else {
35 Console.WriteLine ("FAILED: sbyte not selected for sbyte argument");
36 return 1;
38 return 0;