Add more tests
[mono.git] / mcs / tests / test-115.cs
1 //
2 // This is a compile test, submitted by Joe.   We really need
3 // a more thorough set of tests for the user defined explicit
4 // conversions
5 //
6 class A {
7         public static explicit operator X (A foo)
8         {
9                 X myX = new X();
10
11                 return myX;
12         }
13 }
14
15 class X {
16 }
17
18 class Y : X {
19 }
20
21 class blah {
22         public static int Main ()
23         {
24                 A testA = new A();
25                 
26                 X testX = (X) testA;
27
28                 Y testY = (Y) testA;
29
30                 return 0;
31         }
32 }
33