2004-08-04 Marek Safar <marek.safar@seznam.cz>
authorMarek Safar <marek.safar@gmail.com>
Wed, 4 Aug 2004 14:04:42 +0000 (14:04 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 4 Aug 2004 14:04:42 +0000 (14:04 -0000)
* 62 new error tests.

svn path=/trunk/mcs/; revision=31867

83 files changed:
mcs/errors/ChangeLog
mcs/errors/cs0066-2.cs [new file with mode: 0644]
mcs/errors/cs0102-6.cs
mcs/errors/cs0111-9.cs [new file with mode: 0644]
mcs/errors/cs0119.cs [new file with mode: 0644]
mcs/errors/cs0146-2.cs [new file with mode: 0644]
mcs/errors/cs0146.cs
mcs/errors/cs0160-2.cs [new file with mode: 0644]
mcs/errors/cs0162.cs [new file with mode: 0644]
mcs/errors/cs0168.cs [new file with mode: 0644]
mcs/errors/cs0182-2.cs [new file with mode: 0644]
mcs/errors/cs0192-2.cs [new file with mode: 0644]
mcs/errors/cs0199.cs
mcs/errors/cs0219.cs [new file with mode: 0644]
mcs/errors/cs0230.cs
mcs/errors/cs0231.cs
mcs/errors/cs0241.cs
mcs/errors/cs0245.cs
mcs/errors/cs0251.cs [new file with mode: 0644]
mcs/errors/cs0254.cs [new file with mode: 0644]
mcs/errors/cs0257.cs [new file with mode: 0644]
mcs/errors/cs0448.cs [new file with mode: 0644]
mcs/errors/cs0518.cs [new file with mode: 0644]
mcs/errors/cs0524-2.cs [new file with mode: 0644]
mcs/errors/cs0524-3.cs [new file with mode: 0644]
mcs/errors/cs0524-4.cs [new file with mode: 0644]
mcs/errors/cs0524-5.cs [new file with mode: 0644]
mcs/errors/cs0524.cs
mcs/errors/cs0525-2.cs [new file with mode: 0644]
mcs/errors/cs0525.cs
mcs/errors/cs0526.cs
mcs/errors/cs0529.cs
mcs/errors/cs0531-2.cs [new file with mode: 0644]
mcs/errors/cs0547-2.cs
mcs/errors/cs0547.cs
mcs/errors/cs0548-2.cs [new file with mode: 0644]
mcs/errors/cs0548-3.cs [new file with mode: 0644]
mcs/errors/cs0548-4.cs [new file with mode: 0644]
mcs/errors/cs0548.cs
mcs/errors/cs0559.cs
mcs/errors/cs0564-2.cs [new file with mode: 0644]
mcs/errors/cs0564.cs
mcs/errors/cs0590-2.cs [new file with mode: 0644]
mcs/errors/cs0610-3.cs [new file with mode: 0644]
mcs/errors/cs0620-2.cs [new file with mode: 0644]
mcs/errors/cs0620.cs [new file with mode: 0644]
mcs/errors/cs0622.cs [new file with mode: 0644]
mcs/errors/cs0631.cs [new file with mode: 0644]
mcs/errors/cs0636-2.cs [new file with mode: 0644]
mcs/errors/cs0637-2.cs [new file with mode: 0644]
mcs/errors/cs0637.cs [new file with mode: 0644]
mcs/errors/cs0641.cs [new file with mode: 0644]
mcs/errors/cs0650.cs [new file with mode: 0644]
mcs/errors/cs0652.cs [new file with mode: 0644]
mcs/errors/cs0653.cs [new file with mode: 0644]
mcs/errors/cs0674.cs [new file with mode: 0644]
mcs/errors/cs0685.cs [new file with mode: 0644]
mcs/errors/cs1001.cs
mcs/errors/cs1009.cs [new file with mode: 0644]
mcs/errors/cs1013.cs [new file with mode: 0644]
mcs/errors/cs1016.cs [new file with mode: 0644]
mcs/errors/cs1024.cs [new file with mode: 0644]
mcs/errors/cs1027.cs [new file with mode: 0644]
mcs/errors/cs1029.cs [new file with mode: 0644]
mcs/errors/cs1030.cs [new file with mode: 0644]
mcs/errors/cs1031.cs [new file with mode: 0644]
mcs/errors/cs1035.cs [new file with mode: 0644]
mcs/errors/cs1038.cs [new file with mode: 0644]
mcs/errors/cs1040.cs [new file with mode: 0644]
mcs/errors/cs1055.cs [new file with mode: 0644]
mcs/errors/cs1512.cs [new file with mode: 0644]
mcs/errors/cs1517.cs [new file with mode: 0644]
mcs/errors/cs1522.cs [new file with mode: 0644]
mcs/errors/cs1525.cs
mcs/errors/cs1528.cs
mcs/errors/cs1551.cs [new file with mode: 0644]
mcs/errors/cs1552.cs
mcs/errors/cs1575.cs [new file with mode: 0644]
mcs/errors/cs1605.cs [new file with mode: 0644]
mcs/errors/cs1611.cs [new file with mode: 0644]
mcs/errors/cs1616-2.cs [new file with mode: 0644]
mcs/errors/cs1616.cs [new file with mode: 0644]
mcs/errors/cs2002.cs [new file with mode: 0644]

index ec3d0a8b7161209e330678edf75a2b6039c7512a..18d10949964b5f692b4767ab3cd9a5b56f6fd9ab 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-04 Marek Safar <marek.safar@seznam.cz>
+
+       * 62 new error tests.
+
 2004-07-23  Martin Baulig  <martin@ximian.com>
 
        * cs0260.cs, cs0260-2.cs, cs0261.cs, cs0262.cs, cs0263.cs: New
diff --git a/mcs/errors/cs0066-2.cs b/mcs/errors/cs0066-2.cs
new file mode 100644 (file)
index 0000000..2925fc6
--- /dev/null
@@ -0,0 +1,3 @@
+// cs0066.cs : 'System.TypedReference' : event must be of a delegate type 
+// Line: 5
+public class Sample {        event System.TypedReference reference;}
\ No newline at end of file
index 2e208615fbb82085c3bc252fccb010e8d78a88c1..3a8cb0f5df918747dc1e0891f6825917dddadfdb 100644 (file)
@@ -1,17 +1,7 @@
-// CS0102: The container `Test' already contains a definition for `x'
-// Line: 10
-partial class Test
-{
-       int x;
-}
-
-partial class Test
-{
-       int x;
-}
+// cs102.cs: The class 'X' already contains a definition for 'A'
+// Line: 6
 
-class X
-{
-       static void Main ()
-       { }
+class X {
+       const int A = 10;
+       int A () {}
 }
diff --git a/mcs/errors/cs0111-9.cs b/mcs/errors/cs0111-9.cs
new file mode 100644 (file)
index 0000000..4c97b42
--- /dev/null
@@ -0,0 +1,8 @@
+// cs0111.cs: Class 'C' already defines a member called 'this' with the same parameter types
+// Line: 6
+
+class C
+{
+    bool this [int i] { get { return false; } }
+    bool this [int i] { get { return true; } }
+}
diff --git a/mcs/errors/cs0119.cs b/mcs/errors/cs0119.cs
new file mode 100644 (file)
index 0000000..21b8fb8
--- /dev/null
@@ -0,0 +1,16 @@
+// cs0119.cs: 'Test.E()' is a 'method', which is not valid in the given context
+// Line: 14
+
+using System;
+
+public class Test
+{
+    public static void E () 
+    { 
+    }
+
+    public static void Main () 
+    {
+        Console.WriteLine(E.x);
+    }
+}
diff --git a/mcs/errors/cs0146-2.cs b/mcs/errors/cs0146-2.cs
new file mode 100644 (file)
index 0000000..991f21e
--- /dev/null
@@ -0,0 +1,8 @@
+// cs0146.cs: Circular base class dependency involving 'B' and 'A'
+// Line: 7
+
+struct A : B {
+}
+
+struct B : A {
+}
\ No newline at end of file
index 8b81c046864e453fd4bb90bb8f29e738b1e41332..2b3a60badcf0cbfc58fe1bb3c04ba2721eefa320 100644 (file)
@@ -1,5 +1,6 @@
-// cs0146.cs: circular class definition
-// Line: 6
+// cs0146.cs: Circular base class dependency involving 'B' and 'A'
+// Line: 7
+
 class A : B {
 }
 
diff --git a/mcs/errors/cs0160-2.cs b/mcs/errors/cs0160-2.cs
new file mode 100644 (file)
index 0000000..f30c2fe
--- /dev/null
@@ -0,0 +1,10 @@
+// cs0160.cs: A previous catch clause already catches all exceptions of this or a super type 'System.Exception'
+// Line: 8
+
+class ClassMain {
+        public static void Main() {
+                try { }
+                catch (System.Exception) { }
+                catch (System.Exception) { }
+        }
+}
diff --git a/mcs/errors/cs0162.cs b/mcs/errors/cs0162.cs
new file mode 100644 (file)
index 0000000..6e78e9f
--- /dev/null
@@ -0,0 +1,13 @@
+// cs0162.cs: Unreachable code detected
+// Line: 11
+
+using System;
+
+class E
+{
+   public void Method (int i)
+   {
+       throw new ArgumentNullException ();
+       Console.WriteLine ("Once upon a time..");
+   }
+}
diff --git a/mcs/errors/cs0168.cs b/mcs/errors/cs0168.cs
new file mode 100644 (file)
index 0000000..449c38c
--- /dev/null
@@ -0,0 +1,11 @@
+// cs0168.cs: The variable 'p' is declared but never used
+// Line: 9
+// Compiler options: -warn:3 -warnaserror
+
+class Main
+{
+   public void Method (int i)
+   {
+       long p;
+   }
+}
diff --git a/mcs/errors/cs0182-2.cs b/mcs/errors/cs0182-2.cs
new file mode 100644 (file)
index 0000000..32c931d
--- /dev/null
@@ -0,0 +1,15 @@
+// cs0182.cs : An attribute argument must be a constant expression, typeof expression or array creation expression
+// Line : 13
+
+using System;
+
+class TestAttribute: Attribute
+{
+    public TestAttribute (int[,] i) {}
+}
+
+public class E
+{
+    [Test (null)]
+    public void Method () {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0192-2.cs b/mcs/errors/cs0192-2.cs
new file mode 100644 (file)
index 0000000..1454497
--- /dev/null
@@ -0,0 +1,17 @@
+// cs0192.cs: A readonly field cannot be passed ref or out (except in a constructor)
+// Line: 15
+
+class A
+{
+       public readonly int a;
+       
+       public void Inc (out int a)
+       {
+            a = 3;
+       }
+       
+       public void IncCall ()
+       {
+               Inc (out a);
+       }
+}
index ef9b8f081b13b6e141a1ffddf4a3fd73433bcbb7..c8c53648e7ebaf3ad2bbfb6f602e7dfdc6d4a0c4 100644 (file)
@@ -1,19 +1,8 @@
-// cs0158.cs: A static readonly field cannot be passed ref or out (except in a static constructor)\r
-// Line: 16\r
-\r
-class ClassMain {\r
-        static readonly int index;\r
-    \r
-        static ClassMain () {\r
-                GetMaxIndex (ref index);\r
-        }\r
-        \r
-        static void GetMaxIndex (ref int value) {\r
-                value = 5;\r
-        }\r
-        \r
-        public static void Main () {\r
-                GetMaxIndex (ref index);\r
-        }\r
-}\r
-\r
+// cs0199.cs: A static readonly field cannot be passed ref or out (except in a static constructor)\r// Line: 19\r
+class ClassMain {\r        static readonly int index;\r
+        static ClassMain ()
+        {\r                GetMaxIndex (ref index);\r        }\r
+        static void GetMaxIndex (ref int value)
+        {\r                value = 5;\r        }\r
+        public static void Main ()
+        {\r                GetMaxIndex (ref index);\r        }\r}\r
diff --git a/mcs/errors/cs0219.cs b/mcs/errors/cs0219.cs
new file mode 100644 (file)
index 0000000..a835374
--- /dev/null
@@ -0,0 +1,11 @@
+// cs0219.cs: The variable 'p' is declared but its value is never used
+// Line: 9
+// Compiler options: -warn:3 -warnaserror
+
+class Main
+{
+   public void Method (int i)
+   {
+       long p = -9;
+   }
+}
index d79d153a357e884730399b25b78f7eeec2bfcba1..23ac662d5a08db4aec44d861d582130185484759 100755 (executable)
@@ -1,6 +1,5 @@
-//
-// CS0230.cs: foreach statement must contain the type and the variable identifier
-//
+// CS0230.cs: Type and identifier are both required in a foreach statement
+// Lise: 12
 
 using System;
 
index 478cfe652233311c0882cb241f48ce642d2b3001..8a88a08853b5cb4d5972c2c1a8e69630936e25f1 100644 (file)
@@ -1,7 +1,3 @@
-// cs0231.cs: A params or __arglist parameter must be the last in a formal parameter list\r
-// Line: 5\r
-\r
-class Test {\r
-        void Foo (params object[] o, bool b) {}\r
-}\r
-\r
+// cs0231.cs: A params parameter must be the last in a formal parameter list// Line: 5
+class Test {
+        void Foo (params object[] o, bool b) {}}
index 439ede5a4b6beb836eb8cd186ef427ee47c98291..d6dadee015970ca875658d5a6af8a01ba21f7bcd 100644 (file)
@@ -1,8 +1,7 @@
-// cs0241.cs: Default parameter specifiers are not permitted\r
-// Line: 5\r
-\r
-class TestClass {\r
-        public TestClass(int value = 0) {\r
-        }\r
-}\r
-\r
+// cs0241.cs: Default parameter specifiers are not permitted
+// Line: 5
+
+class TestClass {
+        public TestClass(int value = 0) {
+        }
+}
index 0b7c7f2c8b90a55c16ce8be85eb5b9489b2ee093..de9c909b2f35b0f8944927cd6dd849ec891dbf5d 100644 (file)
@@ -1,9 +1,9 @@
-// cs0245.cs: Destructors and object.Finalize cannot be called directly. Consider calling IDisposable.Dispose if available\r
-// Line: 6\r
-\r
-class Sample {\r
-        void Close () {\r
-                this.Finalize();\r
-        }\r
-}\r
-\r
+// cs0245.cs: Destructors and object.Finalize cannot be called directly. Consider calling IDisposable.Dispose if available
+// Line: 7
+
+class Sample {
+        void Close ()
+        {
+                this.Finalize();
+        }
+}
diff --git a/mcs/errors/cs0251.cs b/mcs/errors/cs0251.cs
new file mode 100644 (file)
index 0000000..a8c5ec3
--- /dev/null
@@ -0,0 +1,12 @@
+// cs0251.cs: Indexing an array with a negative index (array indices always start at zero)
+// Line: 10
+// Compiler options: -warn:2 -warnaserror
+
+class Main
+{
+    public int Method (int[] array)
+    {
+       const int index = 5;
+       return array [index - 10];
+    }
+}
diff --git a/mcs/errors/cs0254.cs b/mcs/errors/cs0254.cs
new file mode 100644 (file)
index 0000000..1f09a55
--- /dev/null
@@ -0,0 +1,20 @@
+// cs0254.cs: The right hand side of a fixed statement assignment may not be a cast expression
+// Line: 16
+// Compiler options: -unsafe
+
+class Box {
+    public int value;
+}
+
+unsafe struct Obsolete {
+}
+
+class MainClass {
+        unsafe public static void Main ()
+        {
+                Box b = new Box ();
+                fixed (long* p = (long*)&b.value)
+                {
+                }
+        }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0257.cs b/mcs/errors/cs0257.cs
new file mode 100644 (file)
index 0000000..42d1278
--- /dev/null
@@ -0,0 +1,3 @@
+// cs0257.cs: An __arglist parameter must be the last parameter in a formal parameter list// Line: 5
+class Test {        void Foo (__arglist, bool b) {}}
+
diff --git a/mcs/errors/cs0448.cs b/mcs/errors/cs0448.cs
new file mode 100644 (file)
index 0000000..2eb312e
--- /dev/null
@@ -0,0 +1,2 @@
+// cs0448.cs: The return type for ++ or -- operator must be the containing type or derived from the containing type// Line: 5
+class SampleClass {        public static int operator ++ (SampleClass value) {                return new SampleClass();        }}
\ No newline at end of file
diff --git a/mcs/errors/cs0518.cs b/mcs/errors/cs0518.cs
new file mode 100644 (file)
index 0000000..54edccc
--- /dev/null
@@ -0,0 +1,10 @@
+// cs0518.cs: The predefined type 'System.Object' is not defined or imported
+// Line: 0
+// Compiler options: -nostdlib
+
+class MainClass
+{
+    public static void Main ()
+    {
+    }
+}
diff --git a/mcs/errors/cs0524-2.cs b/mcs/errors/cs0524-2.cs
new file mode 100644 (file)
index 0000000..e89d155
--- /dev/null
@@ -0,0 +1,4 @@
+// cs0524.cs: 'I' : interfaces cannot declare types// Line: 5
+interface Interface {
+        interface I {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0524-3.cs b/mcs/errors/cs0524-3.cs
new file mode 100644 (file)
index 0000000..835a33f
--- /dev/null
@@ -0,0 +1,7 @@
+// cs0524.cs: 'E' : interfaces cannot declare types// Line: 5
+interface Interface {
+        enum E {
+            White,
+            Black
+        }
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0524-4.cs b/mcs/errors/cs0524-4.cs
new file mode 100644 (file)
index 0000000..272a25a
--- /dev/null
@@ -0,0 +1,7 @@
+// cs0524.cs: 'C' : interfaces cannot declare types
+// Line: 5
+
+interface Interface {
+        public class C {
+        }
+}
diff --git a/mcs/errors/cs0524-5.cs b/mcs/errors/cs0524-5.cs
new file mode 100644 (file)
index 0000000..525d0e6
--- /dev/null
@@ -0,0 +1,6 @@
+// cs0524.cs: 'D' : interfaces cannot declare types
+// Line: 5
+
+interface Interface {
+        delegate void D ();
+}
index c19367335a5135177d1b779b447e764ca5a3ac7c..07d9b280ca66aa5f25811ac3eda670aa7272c64a 100644 (file)
@@ -1,10 +1,7 @@
-// cs0524.cs: 'Struct' : interfaces cannot declare types\r
-// Line: 5\r
-\r
-interface Interface {\r
-        public struct Struct {\r
-        }\r
-}\r
-\r
-\r
-\r
+// cs0524.cs: 'Struct' : interfaces cannot declare types
+// Line: 5
+
+interface Interface {
+        public struct Struct {
+        }
+}
diff --git a/mcs/errors/cs0525-2.cs b/mcs/errors/cs0525-2.cs
new file mode 100644 (file)
index 0000000..e4fb8c1
--- /dev/null
@@ -0,0 +1,2 @@
+// cs0525.cs: Interfaces cannot contain fields// Line: 5
+interface Interface {        const bool value = false;}
\ No newline at end of file
index f0112ef1f24372aba045e35c66c508cd1035ea90..ae144a81e2d52235a7a95e6a4858945b88e6fc54 100644 (file)
@@ -1,9 +1,2 @@
-// cs0525.cs: Interfaces cannot contain fields\r
-// Line: 5\r
-\r
-interface Interface {\r
-        bool value = false;\r
-}\r
-\r
-\r
-\r
+// cs0525.cs: Interfaces cannot contain fields// Line: 5
+interface Interface {        bool value = false;}
\ No newline at end of file
index 58855fb77e7ff2423ad538607709108e15c7e333..08c59d1a34f654e665fb3f68df18a18cc74f8d72 100644 (file)
@@ -1,10 +1,8 @@
-// cs0526.cs: Interfaces cannot contain constructors\r
-// Line: 5\r
-\r
-public interface Interface {\r
-        public Interface () {\r
-        }\r
-}\r
-\r
-\r
-\r
+// cs0526.cs: Interfaces cannot contain constructors
+// Line: 5
+
+public interface Interface {
+        public Interface ()
+        {
+        }
+}
index 52e725162d0205242d651119d32a7e66f8cd3bfd..6dd0bb09df0fe2429332a88b2bd3cab95c683d67 100644 (file)
@@ -1,7 +1,11 @@
-// cs0529: Recursive interface definition
-// Line: 3
+// cs0529: Inherited interface 'C' causes a cycle in the interface hierarchy of 'A'
+// Line: 10
+
 interface A : B {
 }
 
-interface B : A {
+interface B : C {
 }
+
+interface C : A {
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0531-2.cs b/mcs/errors/cs0531-2.cs
new file mode 100644 (file)
index 0000000..04385c3
--- /dev/null
@@ -0,0 +1,2 @@
+// cs0531.cs: 'Interface.P.get' : interface members cannot have a definition// Line: 5
+public interface Interface {        int P { get {} }}
\ No newline at end of file
index 5756eb98c09e78219a8f425fe394efd750a6ddd2..8484537b2817eb6a658837a199751b5d5221c1c4 100644 (file)
@@ -1,7 +1,7 @@
-// cs0547.cs: 'Property' : property or indexer cannot have void type// Line: 5
-interface Interface {
-        void Property { get; }
-}
-
+// cs0547.cs: 'Value' : property cannot have void type
+// Line: 5
 
+interface PropertyInterface {
+        void Value { get; }
+}
 
index b58f4b3f9713a5f465db84b2f09edebff1b93156..a494f9c8b8d700fcc919c09966142394ce8783c6 100644 (file)
@@ -1,9 +1,6 @@
-// cs0547.cs: 'PropertyClass.Value' : property or indexer cannot have void type\r
-// Line: 5\r
-\r
-class PropertyClass {\r
-        public void Value { get {}\r
-        }\r
-}\r
-\r
-\r
+// cs0547.cs: 'Value' : property or indexer cannot have void type
+// Line: 5
+
+class PropertyClass {
+        public void Value { get {} }
+}
diff --git a/mcs/errors/cs0548-2.cs b/mcs/errors/cs0548-2.cs
new file mode 100644 (file)
index 0000000..b9bccd1
--- /dev/null
@@ -0,0 +1,4 @@
+// cs0548.cs: 'PropertyClass.Value' : property or indexer must have at least one accessor// Line: 5
+interface PropertyInterface {        int Value {}}
+
+
diff --git a/mcs/errors/cs0548-3.cs b/mcs/errors/cs0548-3.cs
new file mode 100644 (file)
index 0000000..5526710
--- /dev/null
@@ -0,0 +1,4 @@
+// cs0548.cs: 'PropertyClass.Value' : property or indexer must have at least one accessor// Line: 5
+interface PropertyInterface {        int this [long l] {}}
+
+
diff --git a/mcs/errors/cs0548-4.cs b/mcs/errors/cs0548-4.cs
new file mode 100644 (file)
index 0000000..477067a
--- /dev/null
@@ -0,0 +1,6 @@
+// cs0548.cs: 'this[bool]' : property or indexer must have at least one accessor
+// Line: 5
+
+class IndexerClass {
+        public int this [bool b] { }
+}
index 0620b8938ec5e94cbab56911b70495828129dbf2..695eefc3bdfef381bdc418fd8cbda95f58adc678 100644 (file)
@@ -1,9 +1,7 @@
-// cs0548.cs: 'PropertyClass.Value' : property or indexer must have at least one accessor\r
-// Line: 5\r
-\r
-class PropertyClass {\r
-        public int Value {\r
-        }\r
-}\r
-\r
-\r
+// cs0548.cs: 'PropertyClass.Value' : property or indexer must have at least one accessor
+// Line: 5
+
+class PropertyClass {
+        public int Value {
+        }
+}
index 78d8580f10935b3699e6ffcb218506c53ffcf4e1..964f1aff89bc3cd3d6db14ad6c24e69b90f93cda 100644 (file)
@@ -1,8 +1,8 @@
-// cs0559.cs: The parameter and return type for ++ or \97 operator must be the containing type\r
-// Line: 5\r
-\r
-class SampleClass {\r
-        public static SampleClass operator ++ (int value) {\r
-                return new SampleClass();\r
-        }\r
-}\r
+// cs0559.cs: The parameter type for ++ or -- operator must be the containing type
+// Line: 5
+
+class SampleClass {
+        public static SampleClass operator ++ (int value) {
+                return new SampleClass();
+        }
+}
diff --git a/mcs/errors/cs0564-2.cs b/mcs/errors/cs0564-2.cs
new file mode 100644 (file)
index 0000000..121d868
--- /dev/null
@@ -0,0 +1,8 @@
+// cs0564.cs: Overloaded shift operator must have the type of the first operand be the containing type, and the type of the second operand must be int
+// Line: 5
+
+class SampleClass {
+        public static int operator << (object value, int count) {
+                return 0;
+        }
+}
index a9a818e07bccb1a118ccde4601a7abf93de643c6..f17be3f18468276c4c0ef8794801c3a0c47d7174 100644 (file)
@@ -1,8 +1,8 @@
-// cs0564.cs: Overloaded shift operator must have the type of the first operand be the containing type, and the type of the second operand must be int\r
-// Line: 5\r
-\r
-class SampleClass {\r
-        public static int operator << (SampleClass value, SampleClass count) {\r
-                return 0;\r
-        }\r
-}\r
+// cs0564.cs: Overloaded shift operator must have the type of the first operand be the containing type, and the type of the second operand must be int
+// Line: 5
+
+class SampleClass {
+        public static int operator << (SampleClass value, SampleClass count) {
+                return 0;
+        }
+}
diff --git a/mcs/errors/cs0590-2.cs b/mcs/errors/cs0590-2.cs
new file mode 100644 (file)
index 0000000..8da8d49
--- /dev/null
@@ -0,0 +1,8 @@
+// cs0590.cs: User-defined operators cannot return void
+// Line: 5
+
+class SampleClass {
+        public static void operator << (SampleClass value, int value) {
+                return null;
+        }
+}
diff --git a/mcs/errors/cs0610-3.cs b/mcs/errors/cs0610-3.cs
new file mode 100644 (file)
index 0000000..e66f554
--- /dev/null
@@ -0,0 +1,6 @@
+// cs0610.cs: Field or property cannot be of type 'System.TypedReference'
+// Line: 5
+
+public class Sample {
+        const System.TypedReference arg = null;
+}
diff --git a/mcs/errors/cs0620-2.cs b/mcs/errors/cs0620-2.cs
new file mode 100644 (file)
index 0000000..d622766
--- /dev/null
@@ -0,0 +1,6 @@
+// cs0620.cs: Indexers cannot have void type
+// Line: 5
+
+interface Indexer {
+        void this [int i] { set; }
+}
diff --git a/mcs/errors/cs0620.cs b/mcs/errors/cs0620.cs
new file mode 100644 (file)
index 0000000..d6db0c5
--- /dev/null
@@ -0,0 +1,7 @@
+// cs0620.cs: Indexers cannot have void type
+// Line: 5
+
+class PropertyClass {
+        public void this [int i] { set {}
+        }
+}
diff --git a/mcs/errors/cs0622.cs b/mcs/errors/cs0622.cs
new file mode 100644 (file)
index 0000000..4b8530b
--- /dev/null
@@ -0,0 +1,9 @@
+// cs0622.cs: Can only use array initializer expressions to assign to array types. Try using a new expression instead
+// Line: 7
+
+class X {
+       public static void Main ()
+        {
+            int i = { 3, 4, 5};
+        }
+}
diff --git a/mcs/errors/cs0631.cs b/mcs/errors/cs0631.cs
new file mode 100644 (file)
index 0000000..aa66204
--- /dev/null
@@ -0,0 +1,6 @@
+// cs0622.cs: ref and out are not valid in this context
+// Line: 5
+
+class X {
+       public int this [ref int arg] { set {} }
+}
diff --git a/mcs/errors/cs0636-2.cs b/mcs/errors/cs0636-2.cs
new file mode 100644 (file)
index 0000000..f49380a
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0636: The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit)
+// Line: 10
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace cs0636 {
+       class GValue {
+               [FieldOffset (4)] 
+                public const int value = 2;
+       }
+}
diff --git a/mcs/errors/cs0637-2.cs b/mcs/errors/cs0637-2.cs
new file mode 100644 (file)
index 0000000..1052ff0
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0636: The 'FieldOffset' attribute is not allowed on static or const fields
+// Line: 10
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+struct GValue {
+       [FieldOffset (4)]
+        public const int value = 3;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0637.cs b/mcs/errors/cs0637.cs
new file mode 100644 (file)
index 0000000..1a99b5a
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0636: The 'FieldOffset' attribute is not allowed on static or const fields
+// Line: 10
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+struct GValue {
+       [FieldOffset (4)]
+        public static int value = 3;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0641.cs b/mcs/errors/cs0641.cs
new file mode 100644 (file)
index 0000000..fa24f70
--- /dev/null
@@ -0,0 +1,10 @@
+// cs0641.cs: Attribute 'AttributeUsage' is only valid on classes derived from System.Attribute
+// Line: 6
+
+using System;
+
+[AttributeUsage (AttributeTargets.All)]
+public class A
+{
+}
+
diff --git a/mcs/errors/cs0650.cs b/mcs/errors/cs0650.cs
new file mode 100644 (file)
index 0000000..da029f4
--- /dev/null
@@ -0,0 +1,9 @@
+// cs0650.cs: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed buffer field, use the fixed keyword before the field type
+// Line: 7
+
+class X {
+        public static void Main ()
+        {
+            int myarray[2];
+        }
+}
diff --git a/mcs/errors/cs0652.cs b/mcs/errors/cs0652.cs
new file mode 100644 (file)
index 0000000..47b5ee9
--- /dev/null
@@ -0,0 +1,12 @@
+// cs0652.cs: Comparison to integral constant is useless; the constant is outside the range of type 'type'
+// Line: 9
+
+class X
+{
+       void b ()
+       {
+                byte b = 0;
+                if (b == 500)
+                    return;
+       }
+}
diff --git a/mcs/errors/cs0653.cs b/mcs/errors/cs0653.cs
new file mode 100644 (file)
index 0000000..d5f32a9
--- /dev/null
@@ -0,0 +1,13 @@
+// cs0641.cs: Cannot apply attribute class 'Abstract' because it is abstract
+// Line: 10
+
+using System;
+
+abstract class AbstractAttribute: Attribute
+{
+}
+
+[Abstract]
+class TestClass
+{
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0674.cs b/mcs/errors/cs0674.cs
new file mode 100644 (file)
index 0000000..9e609d1
--- /dev/null
@@ -0,0 +1,12 @@
+// cs0674.cs: Do not use 'System.ParamArrayAttribute'. Use the 'params' keyword instead
+// Line: 8
+
+using System;
+
+public class X
+{
+        public void Error ([ParamArray] int args)
+        {
+        }
+       
+}
diff --git a/mcs/errors/cs0685.cs b/mcs/errors/cs0685.cs
new file mode 100644 (file)
index 0000000..d9b5200
--- /dev/null
@@ -0,0 +1,10 @@
+// cs0685.cs: Conditional method 'MainClass.Method(out int)' cannot have an out parameter
+// Line: 6
+
+class MainClass {
+        [System.Diagnostics.Conditional("DEBUG")]
+        public void Method (out int o)
+        {
+            o = 3;
+        }
+}
index d9fa6b29d283c979fde68133a437e0ed6e21ac28..b108fb6fb4d7f90d906ba6e6d2ebfa76c9e6781e 100755 (executable)
@@ -1,9 +1,7 @@
-//
-// cs1001: identifier expected
-// Line: 8
+// cs1001: Identifier expected
+// Line: 6
 
 class T {
-
        // Change (args) to (string args) to fix it
        public static int Main (args)
        {
diff --git a/mcs/errors/cs1009.cs b/mcs/errors/cs1009.cs
new file mode 100644 (file)
index 0000000..3ef0447
--- /dev/null
@@ -0,0 +1,7 @@
+// cs1009.cs: Unrecognized escape sequence
+// Line : 6
+
+class X
+{
+    static string s = "\i";
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1013.cs b/mcs/errors/cs1013.cs
new file mode 100644 (file)
index 0000000..344da36
--- /dev/null
@@ -0,0 +1,7 @@
+// cs1013.cs: Invalid number
+// Line : 6
+
+class X
+{
+    static int i = 0x;
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1016.cs b/mcs/errors/cs1016.cs
new file mode 100644 (file)
index 0000000..890c5cd
--- /dev/null
@@ -0,0 +1,21 @@
+// cs1016.cs: Named attribute argument expected
+// Line: 19
+
+using System;
+using System.Runtime.CompilerServices;
+
+class Attr: Attribute
+{
+    public Attr (int i) {}
+    
+    public string Arg {
+        set {}
+        get { return "a"; }
+    }
+}
+
+public class E
+{
+    [Attr (Arg = "xxx", 3)]
+    public void Method () {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1024.cs b/mcs/errors/cs1024.cs
new file mode 100644 (file)
index 0000000..20baf96
--- /dev/null
@@ -0,0 +1,4 @@
+// cs1024.cs: Preprocessor directive expected
+// Line: 4
+
+#wrong_directive
diff --git a/mcs/errors/cs1027.cs b/mcs/errors/cs1027.cs
new file mode 100644 (file)
index 0000000..d432096
--- /dev/null
@@ -0,0 +1,5 @@
+// cs1027.cs: #endif directive expected
+// Line: 6
+
+#if false
+
diff --git a/mcs/errors/cs1029.cs b/mcs/errors/cs1029.cs
new file mode 100644 (file)
index 0000000..b87a339
--- /dev/null
@@ -0,0 +1,5 @@
+// cs1029.cs: #error: 'Expected error'
+// Line: 4
+
+#error Expected error
+
diff --git a/mcs/errors/cs1030.cs b/mcs/errors/cs1030.cs
new file mode 100644 (file)
index 0000000..0a2f6b3
--- /dev/null
@@ -0,0 +1,6 @@
+// cs1030.cs: #warning 'Expected error'
+// Line: 4
+// Compiler options: -warnaserror
+
+#warning Expected warning
+
diff --git a/mcs/errors/cs1031.cs b/mcs/errors/cs1031.cs
new file mode 100644 (file)
index 0000000..3495562
--- /dev/null
@@ -0,0 +1,11 @@
+// cs1031.cs: Type expected
+// Line: 8
+
+class M
+{
+    public static void Main ()
+    {
+        p = new this;
+    }
+}
+
diff --git a/mcs/errors/cs1035.cs b/mcs/errors/cs1035.cs
new file mode 100644 (file)
index 0000000..aa6bb4c
--- /dev/null
@@ -0,0 +1,5 @@
+// cs1035.cs: End-of-file found, '*/' expected
+// Line: 4
+
+/*
+
diff --git a/mcs/errors/cs1038.cs b/mcs/errors/cs1038.cs
new file mode 100644 (file)
index 0000000..b006ee9
--- /dev/null
@@ -0,0 +1,4 @@
+// cs1035.cs: #endregion directive expected
+// Line: 5
+
+#region
diff --git a/mcs/errors/cs1040.cs b/mcs/errors/cs1040.cs
new file mode 100644 (file)
index 0000000..05e37d5
--- /dev/null
@@ -0,0 +1,5 @@
+// cs1040.cs: Preprocessor directives must appear as the first non-whitespace character on a line
+// Line: 4
+
+/*    */ #define AA
+
diff --git a/mcs/errors/cs1055.cs b/mcs/errors/cs1055.cs
new file mode 100644 (file)
index 0000000..c58dd9d
--- /dev/null
@@ -0,0 +1,12 @@
+// cs1055.cs: An add or remove accessor expected
+// Line: 9
+
+class E
+{
+    delegate void test();
+    event test Event
+    {
+        bool add;
+    }
+}
+
diff --git a/mcs/errors/cs1512.cs b/mcs/errors/cs1512.cs
new file mode 100644 (file)
index 0000000..8b85fd3
--- /dev/null
@@ -0,0 +1,12 @@
+// cs1512.cs: Keyword 'base' is not available in the current context
+// Line: 11
+
+class Base
+{
+    private string B () { return "a"; }
+}
+
+class E
+{
+   private string B = base.B ();
+}
diff --git a/mcs/errors/cs1517.cs b/mcs/errors/cs1517.cs
new file mode 100644 (file)
index 0000000..a6fcc6e
--- /dev/null
@@ -0,0 +1,5 @@
+// cs1517.cs: Invalid preprocessor expression
+// Line: 4
+
+#if 8
+#endif
diff --git a/mcs/errors/cs1522.cs b/mcs/errors/cs1522.cs
new file mode 100644 (file)
index 0000000..ad72121
--- /dev/null
@@ -0,0 +1,11 @@
+// cs1522.cs: Empty switch block
+// Line: 9
+// Compiler options: -warnaserror
+
+class E
+{
+   public static void Method (int i)
+   {
+       switch (i) {}
+   }
+}
index dc1459ceac03b48a4f553bf9b2343e68b54b7d27..e1a5a661976257467c252cb1fb397bd881f80d56 100755 (executable)
@@ -1,5 +1,6 @@
-// cs1525: Invalid expression term.
+// cs1525: Invalid expression term '}'
 // Line: 7
+
 class X {
        X ()
        {
index 7223adc8f40c5b5d926f51b427e394343ae8b803..4a15a6b297726d12e2aa981acec3025d6f4d7051 100755 (executable)
@@ -1,5 +1,6 @@
-// cs1528.cs: cant specify constructor arguments in declaration
-// Line:
+// cs1528.cs: Expected ; or = (cannot specify constructor arguments in declaration)
+// Line: 13
+
 class X {
        X (int a)
        {
diff --git a/mcs/errors/cs1551.cs b/mcs/errors/cs1551.cs
new file mode 100644 (file)
index 0000000..0384c23
--- /dev/null
@@ -0,0 +1,10 @@
+// cs1551.cs: Indexers must have at least one parameter
+// Line: 8
+
+class Test
+{
+    public int this []
+    {
+        set {}
+    }
+}
\ No newline at end of file
index b64f87bf1c280bae675a61b7abcc3f2c531985b5..5a06d1f4313aa64a20b33bcd307c9ee6e2807d77 100755 (executable)
@@ -1,11 +1,10 @@
-//
-// cs1552.cs: Array type specified, [] must appear before parameter name
-// Line: 8
+// cs1552.cs: Array type specifier, [], must appear before parameter name
+// Line: 6
 
 class T {
        // To fix: change (string args[]) to (string [] args)
-       
        public static int Main (string args[])
        {
+            return 0;
        }
 }
diff --git a/mcs/errors/cs1575.cs b/mcs/errors/cs1575.cs
new file mode 100644 (file)
index 0000000..2b3e18f
--- /dev/null
@@ -0,0 +1,11 @@
+// cs1575.cs: A stackalloc expression requires [] after type
+// Line: 9
+// Compiler options: -unsafe
+
+class E
+{
+   public unsafe void Method (int i)
+   {
+       long* p = stackalloc long; 
+   }
+}
diff --git a/mcs/errors/cs1605.cs b/mcs/errors/cs1605.cs
new file mode 100644 (file)
index 0000000..8bcd528
--- /dev/null
@@ -0,0 +1,14 @@
+// cs1605.cs: Cannot pass 'i' as a ref or out argument because it is read-only
+// Line: 9
+
+class E
+{
+    public E (int[] args)
+    {
+        foreach (int i in args)
+            Init (ref i);
+    }
+    
+    void Init (ref int val) {}
+       
+}
diff --git a/mcs/errors/cs1611.cs b/mcs/errors/cs1611.cs
new file mode 100644 (file)
index 0000000..1a72766
--- /dev/null
@@ -0,0 +1,7 @@
+// cs1611.cs: The params parameter cannot be declared as ref or out
+// Line: 6
+
+class Test
+{
+    public static void Error (params ref int args) {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs1616-2.cs b/mcs/errors/cs1616-2.cs
new file mode 100644 (file)
index 0000000..755f48e
--- /dev/null
@@ -0,0 +1,7 @@
+// cs1616.cs: Option 'keycontainer' overrides 'System.Reflection.AssemblyKeyNameAttribute' given in source
+// Line: 0
+// Compiler options: -keycontainer:CS1616.snk -warnaserror
+
+using System.Reflection;
+
+[assembly: AssemblyKeyNameAttribute("mono.snk")]
diff --git a/mcs/errors/cs1616.cs b/mcs/errors/cs1616.cs
new file mode 100644 (file)
index 0000000..1d52ae2
--- /dev/null
@@ -0,0 +1,12 @@
+// cs1616.cs: Option 'keyfile' overrides 'System.Reflection.AssemblyKeyFileAttribute' given in source
+// Line: 0
+// Compiler options: -keyfile:CS1616.snk -warnaserror
+
+using System.Reflection;
+
+[assembly: AssemblyKeyFile("mono.snk")]
+
+class C
+{
+    public static void Main () {}
+}
\ No newline at end of file
diff --git a/mcs/errors/cs2002.cs b/mcs/errors/cs2002.cs
new file mode 100644 (file)
index 0000000..0ef12c7
--- /dev/null
@@ -0,0 +1,3 @@
+// cs2002.cs: Source file 'cs2002.cs' specified multiple times
+// Line: 0
+// Compiler options: cs2002.cs /warnaserror