[w32file] Move MonoIO.Find{First,Next,Close} to managed
[mono.git] / mcs / tests / test-903.cs
1 using System;
2
3 struct S
4 {
5 }
6
7 class C
8 {
9         public static int ConversionCalled;
10
11         public static implicit operator S (C c)
12         {
13                 ++ConversionCalled;
14                 return new S ();
15         }
16 }
17
18 class Program
19 {
20         static C field;
21
22         static int Main ()
23         {
24                 C c = new C ();
25                 var x = c ?? new S ();
26
27                 if (C.ConversionCalled != 1)
28                         return 1;
29
30                 c = null;
31                 x = c ?? new S ();
32                 if (C.ConversionCalled != 1)
33                         return 2;
34
35                 x = field ?? new S ();
36                 if (C.ConversionCalled != 1)
37                         return 3;
38
39                 return 0;
40         }
41 }