[Mono.Unix] Fix crasher in StringToHeap (#5639)
[mono.git] / mcs / errors / cs0034-3.cs
1 // CS0034: Operator `+' is ambiguous on operands of type `Y' and `X'
2 // Line: 22
3 public class Y {
4         public static implicit operator int (Y y) {
5                 return 0;
6         }
7
8         public static implicit operator string (Y y) {
9                 return null;
10         }
11
12         public static implicit operator Y (string y) {
13                 return null;
14         }
15
16         public static implicit operator Y (int y) {
17                 return null;
18         }
19 }
20
21 public class X {
22         public static implicit operator int (X x) {
23                 return 0;
24         }
25
26         public static implicit operator string (X x) {
27                 return null;
28         }
29 }
30
31 public class C {
32         public static void Main ()
33         {
34                 Y y = new Y () + new X ();
35         }
36 }
37