Author: marek
Date: 2007-11-09 10:53:01 -0500 (Fri, 09 Nov 2007)
New Revision: 89324

Added:
   trunk/mcs/errors/cs0183-2.cs
   trunk/mcs/errors/cs0184-4.cs
   trunk/mcs/errors/cs0184-5.cs
   trunk/mcs/errors/cs0184-6.cs
   trunk/mcs/errors/cs0837.cs
   trunk/mcs/errors/gcs0183-2.cs
   trunk/mcs/errors/gcs0183.cs
   trunk/mcs/errors/gcs0184-2.cs
   trunk/mcs/errors/gcs0184-3.cs
   trunk/mcs/errors/gcs0184.cs
Modified:
   trunk/mcs/errors/cs0244.cs
Log:
New tests.



Added: trunk/mcs/errors/cs0183-2.cs
===================================================================
--- trunk/mcs/errors/cs0183-2.cs        2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/cs0183-2.cs        2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,13 @@
+// CS0183: The given expression is always of the provided (`object') type
+// Line: 10
+// Compiler options: -warnaserror -warn:1
+
+class X
+{
+       public void Foo ()
+       {
+               int x = 1;
+               if (x is object) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/cs0183-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0184-4.cs
===================================================================
--- trunk/mcs/errors/cs0184-4.cs        2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/cs0184-4.cs        2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,12 @@
+// CS0184: The given expression is never of the provided (`B') type
+// Line: 9
+// Compiler options: -warnaserror -warn:1
+
+class B
+{
+       static void Foo ()
+       {
+               if (1 is B) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/cs0184-4.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0184-5.cs
===================================================================
--- trunk/mcs/errors/cs0184-5.cs        2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/cs0184-5.cs        2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,16 @@
+// CS0184: The given expression is never of the provided (`byte') type
+// Line: 13
+// Compiler options: -warnaserror -warn:1
+
+class S {}
+       
+class X
+{
+       static void Main ()
+       {
+               const S x = null;
+               
+               if (x is byte) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/cs0184-5.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/cs0184-6.cs
===================================================================
--- trunk/mcs/errors/cs0184-6.cs        2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/cs0184-6.cs        2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,17 @@
+// CS0184: The given expression is never of the provided (`Y') type
+// Line: 10
+// Compiler options: -warnaserror -warn:1
+
+class Y
+{
+}
+
+class X
+{
+       public void Foo ()
+       {
+               X x = null;
+               if (x is Y) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/cs0184-6.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/errors/cs0244.cs
===================================================================
--- trunk/mcs/errors/cs0244.cs  2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/cs0244.cs  2007-11-09 15:53:01 UTC (rev 89324)
@@ -1,4 +1,4 @@
-// cs0244.cs: "is" or "as" are not valid on pointer types
+// CS0244: The `is' operator cannot be applied to an operand of pointer type
 // Line: 7
 // Compiler options: -unsafe
 

Added: trunk/mcs/errors/cs0837.cs
===================================================================
--- trunk/mcs/errors/cs0837.cs  2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/cs0837.cs  2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,12 @@
+// CS0837: The `is' operator cannot be applied to a lambda expression or 
anonymous method
+// Line: 8
+
+class X
+{
+       static void Main ()
+       {
+               if (delegate {} is int) {
+                       return;
+               }
+       }
+}


Property changes on: trunk/mcs/errors/cs0837.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/gcs0183-2.cs
===================================================================
--- trunk/mcs/errors/gcs0183-2.cs       2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/gcs0183-2.cs       2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,13 @@
+// CS0183: The given expression is always of the provided (`int') type
+// Line: 10
+// Compiler options: -warnaserror -warn:1
+
+class X
+{
+       public void Foo ()
+       {
+               int? x = null;
+               if (x is int) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/gcs0183-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/gcs0183.cs
===================================================================
--- trunk/mcs/errors/gcs0183.cs 2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/gcs0183.cs 2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,13 @@
+// CS0183: The given expression is always of the provided (`int?') type
+// Line: 10
+// Compiler options: -warnaserror -warn:1
+
+class X
+{
+       public void Foo ()
+       {
+               int? x = null;
+               if (x is int?) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/gcs0183.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/gcs0184-2.cs
===================================================================
--- trunk/mcs/errors/gcs0184-2.cs       2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/gcs0184-2.cs       2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,12 @@
+// CS0184: The given expression is never of the provided (`T') type
+// Line: 9
+// Compiler options: -warnaserror -warn:1
+
+class X<T> where T : class
+{
+       static void Foo ()
+       {
+               if (1 is T) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/gcs0184-2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/gcs0184-3.cs
===================================================================
--- trunk/mcs/errors/gcs0184-3.cs       2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/gcs0184-3.cs       2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,13 @@
+// CS0184: The given expression is never of the provided (`int') type
+// Line: 10
+// Compiler options: -warnaserror -warn:1
+
+class X
+{
+       public void Foo<T> () where T : class
+       {
+               T t = default (T);
+               if (t is int) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/gcs0184-3.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/mcs/errors/gcs0184.cs
===================================================================
--- trunk/mcs/errors/gcs0184.cs 2007-11-09 15:52:37 UTC (rev 89323)
+++ trunk/mcs/errors/gcs0184.cs 2007-11-09 15:53:01 UTC (rev 89324)
@@ -0,0 +1,16 @@
+// CS0184: The given expression is never of the provided (`bool?') type
+// Line: 13
+// Compiler options: -warnaserror -warn:1
+
+using System;
+
+class X
+{
+       void Foo ()
+       {
+               int? i = null;
+               
+               if (i is bool?) {
+               }
+       }
+}


Property changes on: trunk/mcs/errors/gcs0184.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to