Author: marek
Date: 2008-01-24 04:42:10 -0500 (Thu, 24 Jan 2008)
New Revision: 93768
Added:
trunk/mcs/errors/gcs0133.cs
trunk/mcs/errors/gcs0458-2.cs
Modified:
trunk/mcs/errors/cs0077.cs
Log:
New tests.
Modified: trunk/mcs/errors/cs0077.cs
===================================================================
--- trunk/mcs/errors/cs0077.cs 2008-01-24 09:41:53 UTC (rev 93767)
+++ trunk/mcs/errors/cs0077.cs 2008-01-24 09:42:10 UTC (rev 93768)
@@ -1,4 +1,4 @@
-// cs0077.cs: The as operator must be used with a reference type
(`ErrorCS0077.Foo' is a value type)
+// CS0077: The `as' operator cannot be used with a non-nullable value type
`ErrorCS0077.Foo'
// Line: 10
using System;
Added: trunk/mcs/errors/gcs0133.cs
===================================================================
--- trunk/mcs/errors/gcs0133.cs 2008-01-24 09:41:53 UTC (rev 93767)
+++ trunk/mcs/errors/gcs0133.cs 2008-01-24 09:42:10 UTC (rev 93768)
@@ -0,0 +1,11 @@
+// CS0133: The expression being assigned to `d' must be constant
+// Line: 8
+
+public class MainClass
+{
+ public static void Main()
+ {
+ const object d = (decimal?)null;
+ }
+}
+
Added: trunk/mcs/errors/gcs0458-2.cs
===================================================================
--- trunk/mcs/errors/gcs0458-2.cs 2008-01-24 09:41:53 UTC (rev 93767)
+++ trunk/mcs/errors/gcs0458-2.cs 2008-01-24 09:42:10 UTC (rev 93768)
@@ -0,0 +1,12 @@
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 8
+// Compiler options: -warnaserror -warn:2
+
+public class MainClass
+{
+ public static void Main()
+ {
+ object d = (int?)null as int?;
+ }
+}
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches