More new tests.
authorMarek Safar <marek.safar@gmail.com>
Mon, 3 Mar 2008 19:21:17 +0000 (19:21 -0000)
committerMarek Safar <marek.safar@gmail.com>
Mon, 3 Mar 2008 19:21:17 +0000 (19:21 -0000)
svn path=/trunk/mcs/; revision=97215

14 files changed:
mcs/errors/cs0019-20.cs
mcs/errors/cs0019-27.cs [new file with mode: 0644]
mcs/errors/cs0019-28.cs [new file with mode: 0644]
mcs/errors/cs0019-29.cs [new file with mode: 0644]
mcs/errors/cs0019-30.cs [new file with mode: 0644]
mcs/errors/cs0034.cs [deleted file]
mcs/errors/cs0252.cs
mcs/errors/cs0253.cs
mcs/errors/cs0266-16.cs [new file with mode: 0644]
mcs/errors/cs1718-2.cs [new file with mode: 0644]
mcs/errors/gcs0019-10.cs [new file with mode: 0644]
mcs/errors/gcs0019-9.cs [new file with mode: 0644]
mcs/errors/known-issues-gmcs
mcs/errors/known-issues-mcs

index 8bc9eb4e4b91d8a484d377578329546eb5367d8e..d58bdbd7e57d1308654ad5c0a5036cc514039bd2 100644 (file)
@@ -1,4 +1,4 @@
-// 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
diff --git a/mcs/errors/cs0019-27.cs b/mcs/errors/cs0019-27.cs
new file mode 100644 (file)
index 0000000..b3ff04c
--- /dev/null
@@ -0,0 +1,23 @@
+// 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;
+       }
+}
diff --git a/mcs/errors/cs0019-28.cs b/mcs/errors/cs0019-28.cs
new file mode 100644 (file)
index 0000000..85cf7b9
--- /dev/null
@@ -0,0 +1,9 @@
+// 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);
+       }
+}
diff --git a/mcs/errors/cs0019-29.cs b/mcs/errors/cs0019-29.cs
new file mode 100644 (file)
index 0000000..e5fbf90
--- /dev/null
@@ -0,0 +1,9 @@
+// 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);
+       }
+}
diff --git a/mcs/errors/cs0019-30.cs b/mcs/errors/cs0019-30.cs
new file mode 100644 (file)
index 0000000..95d03e1
--- /dev/null
@@ -0,0 +1,15 @@
+// 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;
+       }
+}
diff --git a/mcs/errors/cs0034.cs b/mcs/errors/cs0034.cs
deleted file mode 100644 (file)
index fe44875..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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);
-       }
-
-}
index 4e296420b0f125447c3d3e9cd3241c06c26077e0..78721ee36482ee79f7ee3d8881aad7738142f662 100644 (file)
@@ -1,4 +1,4 @@
-// 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
 
index d70c9433b3ff1e09790857ded457d10b10d03ef9..ec548af8ec628fe5e26264c1f20e3578baca5f3d 100644 (file)
@@ -1,4 +1,4 @@
-// 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
 
diff --git a/mcs/errors/cs0266-16.cs b/mcs/errors/cs0266-16.cs
new file mode 100644 (file)
index 0000000..5b031bb
--- /dev/null
@@ -0,0 +1,11 @@
+// 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;
+       }
+}
diff --git a/mcs/errors/cs1718-2.cs b/mcs/errors/cs1718-2.cs
new file mode 100644 (file)
index 0000000..5fbcd63
--- /dev/null
@@ -0,0 +1,14 @@
+// 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
diff --git a/mcs/errors/gcs0019-10.cs b/mcs/errors/gcs0019-10.cs
new file mode 100644 (file)
index 0000000..844bf0e
--- /dev/null
@@ -0,0 +1,11 @@
+// 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;
+       }
+}
diff --git a/mcs/errors/gcs0019-9.cs b/mcs/errors/gcs0019-9.cs
new file mode 100644 (file)
index 0000000..4915f42
--- /dev/null
@@ -0,0 +1,12 @@
+// 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)
+               {
+               }
+       }
+}
index f131eae8f8466863c8becb52df981dc134a16f6c..c1a65d1956bdc9076a57765e1b17e0a2671e6a3f 100644 (file)
@@ -11,7 +11,6 @@
 # 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
@@ -27,6 +26,7 @@ cs1521-3.cs
 cs1525.cs
 cs1528.cs
 cs1586.cs
+gcs0019-9.cs
 gcs1644-10.cs NO ERROR
 
 # Operators
index 32dd5a920a15849083577a368283f8779333db9a..a8593b7abf5a38b8f92d9a1c3cc8ece0e61bc979 100644 (file)
@@ -11,7 +11,6 @@
 # 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