2003-03-27 Ville Palo <vi64pa@kolumbus.fi>
[mono.git] / mcs / errors / cs0035.cs
1 // cs0035.cs: Ambiguous 'operator' on an operand of type 'foo'
2 // Line: 23 
3
4 using System;
5
6 class ErrorCS0035 {
7         int i;
8         public ErrorCS0035 (int x) {
9                 i = x;
10         }
11         
12         public static implicit operator long (ErrorCS0035 x) {
13                 return (long) x.i;
14         }
15
16         public static implicit operator ulong (ErrorCS0035 x) {
17                 return (ulong) x.i;
18         }
19         
20         public static void Main () {
21                 object o;
22                 ErrorCS0035 error = new ErrorCS0035 (10);
23                 Console.WriteLine ("o = -i = {0}", - error); 
24                 
25         }
26 }
27