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:
1  2 
mcs/errors/cs0006.cs
mcs/errors/cs0723-2.cs
mcs/errors/cs0723.cs
mcs/errors/cs1028.cs
mcs/errors/cs1656-5.cs
mcs/errors/gcs0118.cs
mcs/errors/gcs0283.cs
mcs/errors/gcs0449-2.cs
mcs/errors/gcs0693.cs
mcs/errors/gcs0701-3.cs
mcs/errors/gcs0703.cs
mcs/errors/gcs0718.cs
mcs/errors/gcs0723.cs

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..72dd50b54ae3c66d0bc096d9a08951d4fbbee658
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..971c86b5f4b86b8e9a994fc4e6b15821d5dc93c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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,853a7bb7d64eb9b488ada30fde96c06b0f1a59b1..413dc9bdb4900c1138d6e308fab006b08571be39
@@@ -1,4 -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 {
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5a11e4a601352cb842bae7980afa6d0b3250805a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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,2eb96c77eb0985f5ee21546fb5c2671ee80449bc..763626bf55c09157b6b356cd5d74f5025dd08cbb
@@@ -1,6 -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 -8,6 +11,6 @@@
          {
                Test t = new Test ();
                
--                t.Method += delegate {  };
++                t.Method_1 += delegate {  };
          }
  }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d69a42c6cf0c88d0e4c4676e6a3a46fff4614031
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3643fa681393f89607d56f3fba0b94bcac38c1ae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 5c3affa995d0d25473679b6b7a9a49a2727b0f2e,5c3affa995d0d25473679b6b7a9a49a2727b0f2e..6ed5fb8d47ee70950de5c8e7527f842788e50dcb
@@@ -1,7 -1,7 +1,7 @@@
  // CS0449: The `class' or `struct' constraint must be the first constraint specified
  // Line: 8
  
--interface I
++public interface I
  {
  }
  
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f6a0be8b8f2c0ebdec263848834fe12a2931079f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4522501b98d65ae25f3f3d4d99ca1c418e5e4980
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c39ab16ee1af12598a61444bf1352c8f73276408
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..282ff3b0312f75160ccc99cc2dbf96f8000fd4e7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8ddfca411e8b488f0604c1678d10e427f1eee55d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,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
++}