Author: marek
Date: 2007-12-27 04:37:12 -0500 (Thu, 27 Dec 2007)
New Revision: 91922
Added:
trunk/mcs/errors/cs1501-2.cs
trunk/mcs/errors/gcs0019-7.cs
trunk/mcs/errors/gcs0458.cs
trunk/mcs/errors/gcs1501-3.cs
Log:
New tests.
Added: trunk/mcs/errors/cs1501-2.cs
===================================================================
--- trunk/mcs/errors/cs1501-2.cs 2007-12-27 09:36:47 UTC (rev 91921)
+++ trunk/mcs/errors/cs1501-2.cs 2007-12-27 09:37:12 UTC (rev 91922)
@@ -0,0 +1,22 @@
+// CS1501: No overload for method `Foo' takes `0' arguments
+// Line: 20
+
+class A
+{
+ protected virtual void Foo (object[] arr)
+ {
+ }
+}
+
+class B : A
+{
+ protected override void Foo (params object[] arr)
+ {
+ }
+
+ static void Bar()
+ {
+ B b = new B ();
+ b.Foo ();
+ }
+}
Added: trunk/mcs/errors/gcs0019-7.cs
===================================================================
--- trunk/mcs/errors/gcs0019-7.cs 2007-12-27 09:36:47 UTC (rev 91921)
+++ trunk/mcs/errors/gcs0019-7.cs 2007-12-27 09:37:12 UTC (rev 91922)
@@ -0,0 +1,9 @@
+// CS0019: Operator `??' cannot be applied to operands of type `null' and
`anonymous method'
+// Line: 8
+
+delegate void D ();
+
+class F
+{
+ D d = null ?? delegate { };
+}
Added: trunk/mcs/errors/gcs0458.cs
===================================================================
--- trunk/mcs/errors/gcs0458.cs 2007-12-27 09:36:47 UTC (rev 91921)
+++ trunk/mcs/errors/gcs0458.cs 2007-12-27 09:37:12 UTC (rev 91922)
@@ -0,0 +1,11 @@
+// CS0458: The result of the expression is always `null' of type `bool?'
+// Line: 8
+// Compiler options: -warnaserror -warn:2
+
+class C
+{
+ static void Foo()
+ {
+ bool? b = null as bool?;
+ }
+}
Added: trunk/mcs/errors/gcs1501-3.cs
===================================================================
--- trunk/mcs/errors/gcs1501-3.cs 2007-12-27 09:36:47 UTC (rev 91921)
+++ trunk/mcs/errors/gcs1501-3.cs 2007-12-27 09:37:12 UTC (rev 91922)
@@ -0,0 +1,17 @@
+// CS1501: No overload for method `Foo' takes `0' arguments
+// Line: 15
+
+class Base<T>
+{
+ protected virtual void Foo<U> (U u)
+ {
+ }
+}
+
+class Derived<T> : Base<int>
+{
+ protected override void Foo<U> (U u)
+ {
+ base.Foo ();
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches