Merge pull request #524 from pruiz/mvc-allowhtml-fix
[mono.git] / mcs / tests / test-864.cs
1 class MainClass
2 {
3         static int Foo (double d)
4         {
5                 return 0;
6         }
7
8         static int Foo (int d)
9         {
10                 return 100;
11         }
12
13         public static int Main ()
14         {
15                 decimal a = new A ();
16                 long b = new B ();
17                 if (b != 7)
18                         return 1;
19                 
20                 if (Foo (new B2 ()) != 100)
21                         return 1;
22
23                 return 0;
24         }
25 }
26
27 public class A
28 {
29         public static implicit operator int (A a)
30         {
31                 return 6;
32         }
33 }
34
35 public class B : A
36 {
37         public static implicit operator int (B b)
38         {
39                 return 7;
40         }
41 }
42
43 public class A2
44 {
45         public static implicit operator double (A2 a)
46         {
47                 return 2;
48         }
49 }
50
51 public class B2 : A2
52 {
53         public static implicit operator int (B2 b)
54         {
55                 return 3;
56         }
57 }