[mono/tests] Fix out of tree build.
[mono-project.git] / mcs / tests / test-322.cs
blob702fb62c4a2f6b895100a23827faa84fb96c6eb3
1 //
2 // User casts basically would produce more than one match on
3 // integral types, since the implicit conversion to int is
4 // also an implicit conversion to long. This tests that
5 // we do not bail too early on the switch statement with its
6 // implicit conversion.
8 class Y {
9 byte b;
11 public static implicit operator int (Y i)
13 return i.b;
16 public Y (byte b)
18 this.b = b;
22 class X {
23 public static void Main ()
25 Y y = new Y (1);
27 switch (y){
28 case 0:
29 break;
30 case 1:
31 break;
34 int a = y;