2010-05-31 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0034-3.cs
blob1958679de9ae6cb4d3ed1da0d98c55700398fff2
1 // cs0034-2.cs : 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;
8 public static implicit operator string (Y y) {
9 return null;
12 public static implicit operator Y (string y) {
13 return null;
16 public static implicit operator Y (int y) {
17 return null;
21 public class X {
22 public static implicit operator int (X x) {
23 return 0;
26 public static implicit operator string (X x) {
27 return null;
31 public class C {
32 public static void Main ()
34 Y y = new Y () + new X ();