-// CS0019: Operator `-' cannot be applied to operands of type `ulong and `sbyte'
+// CS0019: Operator `-' cannot be applied to operands of type `ulong' and `sbyte'
// Line: 6
class S
--- /dev/null
+// CS0019: Operator `==' cannot be applied to operands of type `C.E1' and `C.E2'
+// Line: 21
+
+class C
+{
+ enum E1 : long
+ {
+ A
+ }
+
+ enum E2 : sbyte
+ {
+ A
+ }
+
+ public static void Main ()
+ {
+ E1 b = E1.A;
+ E2 d = E2.A;
+
+ bool brr = b == d;
+ }
+}
--- /dev/null
+// CS0019: Operator `>=' cannot be applied to operands of type `ulong' and `sbyte'
+// Line: 7
+
+class X {
+ bool ret (ulong u, sbyte s)
+ {
+ return (u >= s);
+ }
+}
--- /dev/null
+// CS0019: Operator `>=' cannot be applied to operands of type `ulong' and `short'
+// Line: 7
+
+class X {
+ bool ret (ulong u, short s)
+ {
+ return (u >= s);
+ }
+}
--- /dev/null
+// CS0019: Operator `!=' cannot be applied to operands of type `Test.DelegateA' and `Test.DelegateB'
+// Line: 13
+
+using System;
+
+public class Test
+{
+ public delegate int DelegateA(bool b);
+ public delegate int DelegateB(bool b);
+
+ static bool TestCompare (DelegateA a, DelegateB b)
+ {
+ return a != b;
+ }
+}
+++ /dev/null
-// cs0034.cs: Operator `>=' is ambiguous on operands of type `ulong' and `sbyte'
-// Line: 7
-class X {
-
- bool ret (ulong u, sbyte s)
- {
- return (u >= s);
- }
-
- bool ret (ulong u, short s)
- {
- return (u >= s);
- }
-
-}
-// cs0252.cs: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type `string'
+// CS0252: Possible unintended reference comparison. Consider casting the left side of the expression to `string' to compare the values
// Line: 10
// Compiler options: -warn:2 -warnaserror
-// cs0253.cs: Possible unintended reference comparison; to get a value comparison, cast the right hand side to type `string'
+// CS0253: Possible unintended reference comparison. Consider casting the right side of the expression to `string' to compare the values
// Line: 10
// Compiler options: -warn:2 -warnaserror
--- /dev/null
+// CS0266: Cannot implicitly convert type `long' to `uint'. An explicit conversion exists (are you missing a cast?)
+// Line: 9
+
+class S
+{
+ uint Test (uint a)
+ {
+ int b = 0;
+ return a * b;
+ }
+}
--- /dev/null
+// CS1718: A comparison made to same variable. Did you mean to compare something else?
+// Line: 12
+// Compiler options: -warnaserror -warn:3
+
+class A
+{
+ delegate void D ();
+ D d = null;
+
+ public A ()
+ {
+ bool b = d == d;
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0019: Operator `==' cannot be applied to operands of type `object' and `V'
+// Line: 9
+
+public class C<V>
+{
+ public bool TryGet (V v)
+ {
+ object tmp = null;
+ return tmp == v;
+ }
+}
--- /dev/null
+// CS0019: Operator `!=' cannot be applied to operands of type `ulong?' and `int'
+// Line: 8
+
+class C
+{
+ static void Test (ulong? x, int y)
+ {
+ if (x != y)
+ {
+ }
+ }
+}
# csXXXX.cs NO ERROR : error test case doesn't report any error. An exception is considered
# as NO ERROR and CS5001 is automatically ignored.
-cs0019-20.cs
cs0158-5.cs
cs0162-7.cs NO ERROR
cs0214-10.cs NO ERROR
cs1525.cs
cs1528.cs
cs1586.cs
+gcs0019-9.cs
gcs1644-10.cs NO ERROR
# Operators
# csXXXX.cs NO ERROR : error test case doesn't report any error. An exception is considered
# as NO ERROR and CS5001 is automatically ignored.
-cs0019-20.cs
cs0158-5.cs
cs0162-7.cs NO ERROR
cs0525.cs