New tests.
authorMarek Safar <marek.safar@gmail.com>
Thu, 14 Sep 2006 20:36:19 +0000 (20:36 -0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 14 Sep 2006 20:36:19 +0000 (20:36 -0000)
svn path=/trunk/mcs/; revision=65428

13 files changed:
mcs/errors/cs0006.cs [new file with mode: 0644]
mcs/errors/cs0723-2.cs [new file with mode: 0644]
mcs/errors/cs0723.cs
mcs/errors/cs1028.cs [new file with mode: 0644]
mcs/errors/cs1656-5.cs
mcs/errors/gcs0118.cs [new file with mode: 0644]
mcs/errors/gcs0283.cs [new file with mode: 0644]
mcs/errors/gcs0449-2.cs
mcs/errors/gcs0693.cs [new file with mode: 0644]
mcs/errors/gcs0701-3.cs [new file with mode: 0644]
mcs/errors/gcs0703.cs [new file with mode: 0644]
mcs/errors/gcs0718.cs [new file with mode: 0644]
mcs/errors/gcs0723.cs [new file with mode: 0644]

diff --git a/mcs/errors/cs0006.cs b/mcs/errors/cs0006.cs
new file mode 100644 (file)
index 0000000..72dd50b
--- /dev/null
@@ -0,0 +1,7 @@
+// CS0006: Cannot find assembly file `a:b'\r
+// Line: 0\r
+// Compiler options: -r:a:b\r
+\r
+class C\r
+{\r
+}
\ No newline at end of file
diff --git a/mcs/errors/cs0723-2.cs b/mcs/errors/cs0723-2.cs
new file mode 100644 (file)
index 0000000..971c86b
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0723: `MainClass.s': cannot declare variables of static types\r
+// Line: 10\r
+\r
+static class S\r
+{\r
+}\r
+\r
+class MainClass\r
+{\r
+    S s;\r
+}\r
index 853a7bb7d64eb9b488ada30fde96c06b0f1a59b1..413dc9bdb4900c1138d6e308fab006b08571be39 100644 (file)
@@ -1,4 +1,4 @@
-// cs0723.cs: Cannot declare variable of static type `StaticClass'
+// CS0723: `sc': cannot declare variables of static types
 // Line: 10
 
 static class StaticClass {
diff --git a/mcs/errors/cs1028.cs b/mcs/errors/cs1028.cs
new file mode 100644 (file)
index 0000000..5a11e4a
--- /dev/null
@@ -0,0 +1,8 @@
+// CS1028: Unexpected processor directive (no #if for this #endif)\r
+// Line: 4\r
+\r
+#endif\r
+\r
+class C\r
+{\r
+}\r
index 2eb96c77eb0985f5ee21546fb5c2671ee80449bc..763626bf55c09157b6b356cd5d74f5025dd08cbb 100644 (file)
@@ -1,6 +1,9 @@
+// CS1656: Cannot assign to `Method_1' because it is a `method group'
+// Line: 14
+
 public class Test
 {
-       void Method ()
+       void Method_1 ()
        {
        }
        
@@ -8,6 +11,6 @@ public class Test
         {
                Test t = new Test ();
                
-                t.Method += delegate {  };
+                t.Method_1 += delegate {  };
         }
 }
diff --git a/mcs/errors/gcs0118.cs b/mcs/errors/gcs0118.cs
new file mode 100644 (file)
index 0000000..d69a42c
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0118: `N' is a `namespace' but a `type' was expected\r
+// Line: 8\r
+\r
+namespace N\r
+{\r
+}\r
+\r
+public class C<T>  where T : N\r
+{\r
+}
\ No newline at end of file
diff --git a/mcs/errors/gcs0283.cs b/mcs/errors/gcs0283.cs
new file mode 100644 (file)
index 0000000..3643fa6
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0283: The type `T' cannot be declared const\r
+// Line: 8\r
+\r
+struct S\r
+{\r
+       public void Foo<T> () where T : struct\r
+       {\r
+               const T t = null;\r
+       }\r
+}
\ No newline at end of file
index 5c3affa995d0d25473679b6b7a9a49a2727b0f2e..6ed5fb8d47ee70950de5c8e7527f842788e50dcb 100644 (file)
@@ -1,7 +1,7 @@
 // CS0449: The `class' or `struct' constraint must be the first constraint specified
 // Line: 8
 
-interface I
+public interface I
 {
 }
 
diff --git a/mcs/errors/gcs0693.cs b/mcs/errors/gcs0693.cs
new file mode 100644 (file)
index 0000000..f6a0be8
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0693: Type parameter `T' has the same name as the type parameter from outer type `A<T>'\r
+// Line: 7\r
+// Compiler options: -warnaserror -warn:3\r
+\r
+class A<T>\r
+{\r
+    interface I<T>\r
+    {\r
+    }\r
+}
\ No newline at end of file
diff --git a/mcs/errors/gcs0701-3.cs b/mcs/errors/gcs0701-3.cs
new file mode 100644 (file)
index 0000000..4522501
--- /dev/null
@@ -0,0 +1,6 @@
+// CS0703: `string[]' is not a valid constraint. A constraint must be an interface, a non-sealed class or a type parameter\r
+// Line: 4\r
+\r
+public class C<T>  where T : string[]\r
+{\r
+}
\ No newline at end of file
diff --git a/mcs/errors/gcs0703.cs b/mcs/errors/gcs0703.cs
new file mode 100644 (file)
index 0000000..c39ab16
--- /dev/null
@@ -0,0 +1,10 @@
+// CS0703: Inconsistent accessibility: constraint type `I' is less accessible than `C<T>'\r
+// Line: 8\r
+\r
+interface I\r
+{\r
+}\r
+\r
+public class C<T>  where T : I\r
+{\r
+}
\ No newline at end of file
diff --git a/mcs/errors/gcs0718.cs b/mcs/errors/gcs0718.cs
new file mode 100644 (file)
index 0000000..282ff3b
--- /dev/null
@@ -0,0 +1,15 @@
+// CS0718: `S': static classes cannot be used as generic arguments\r
+// Line: 14\r
+\r
+static class S\r
+{\r
+}\r
+\r
+class C<T>\r
+{\r
+}\r
+\r
+class Test\r
+{\r
+       C<S> foo;\r
+}
\ No newline at end of file
diff --git a/mcs/errors/gcs0723.cs b/mcs/errors/gcs0723.cs
new file mode 100644 (file)
index 0000000..8ddfca4
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0723: `C<T>.t': cannot declare variables of static types\r
+// Line: 10\r
+\r
+static class S<T>\r
+{\r
+}\r
+\r
+public class C<T>\r
+{\r
+       S<T> t;\r
+}
\ No newline at end of file