[threadpool] Pass callback at initialization (#4546)
[mono.git] / mcs / errors / cs0075.cs
index 3a40c4e4d48eb36b6d2c64ee9447623c6b926e38..367cfc7d579693d1bbbfde6238d3cdc87e27ce31 100644 (file)
@@ -1,12 +1,23 @@
-// cs0075.cs: Casting a negative value needs to have the value in parentheses.
-// Line: 9
+// CS0075: To cast a negative value, you must enclose the value in parentheses
+// Line: 20
+class X
+{
+       public readonly int i;
 
-using System;
+       public X (int i)
+       {
+               this.i = i;
+       }
 
-class ErrorCS0075 {
-       static double x;
-       public static void Main () {
-               x = (double) -1;
+       public static implicit operator X (int value)
+       {
+               return new X (value);
        }
-}
 
+       public static void Main ()
+       {
+               int a = 4, b = 5;
+X x = (X) -a;
+               System.Console.WriteLine (x.i);
+       }
+}