New tests.
authorMarek Safar <marek.safar@gmail.com>
Wed, 1 Aug 2007 11:47:51 +0000 (11:47 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 1 Aug 2007 11:47:51 +0000 (11:47 -0000)
svn path=/trunk/mcs/; revision=83166

mcs/errors/GCS0122-2-lib.cs [new file with mode: 0644]
mcs/errors/Makefile
mcs/errors/gcs0122-2.cs [new file with mode: 0644]
mcs/errors/gcs0411-8.cs
mcs/errors/gcs1001.cs [new file with mode: 0644]

diff --git a/mcs/errors/GCS0122-2-lib.cs b/mcs/errors/GCS0122-2-lib.cs
new file mode 100644 (file)
index 0000000..e229117
--- /dev/null
@@ -0,0 +1,5 @@
+class Test<A>
+{
+       public void Foo<V> (V v, V w)
+       { }
+}
index 9ce17c7b9e5153372eb9aa19303e71c95ce71629..20ca6f589076f29f942ecbf06b6a4092de405868 100644 (file)
@@ -11,7 +11,7 @@ ifeq (default, $(PROFILE))
 
 MCS = $(with_mono_path) $(INTERNAL_MCS)
 else
-EXTRA_SUPPORT_FILES = CSFriendAssembly-lib.dll GCS0730-lib.dll GCS0733-lib.dll
+EXTRA_SUPPORT_FILES = CSFriendAssembly-lib.dll GCS0122-2-lib.dll GCS0730-lib.dll GCS0733-lib.dll
 endif
 
 ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
diff --git a/mcs/errors/gcs0122-2.cs b/mcs/errors/gcs0122-2.cs
new file mode 100644 (file)
index 0000000..0f54562
--- /dev/null
@@ -0,0 +1,12 @@
+// CS0122: `Test<A>' is inaccessible due to its protection level
+// Line: 8
+// Compiler options: -r:GCS0122-2-lib.dll
+
+class X
+{
+       static void Main ()
+       {
+               Test<float> test = new Test<float> ();
+       }
+}
+
index 55b8cb3e6ae190263140c0bfee114f7208b8cd12..214a14477a91f540b6f50602610ce24a6b446e06 100644 (file)
@@ -4,7 +4,7 @@
 
 public class C
 {
-       public delegate TR Func<TR, TA> (TA t);
+       public delegate T1 Func<T1, T2> (T2 t);
        
        public static TR Test<TR, TA> (Func<TR, TA> f, Func<TR, TA> f2)
        {
diff --git a/mcs/errors/gcs1001.cs b/mcs/errors/gcs1001.cs
new file mode 100644 (file)
index 0000000..61f9833
--- /dev/null
@@ -0,0 +1,9 @@
+// CS1001: Identifier expected
+// Line: 6
+
+class B<T>
+{
+       T Foo (T)
+       {
+       }
+}
\ No newline at end of file