Author: marek
Date: 2008-01-14 13:07:15 -0500 (Mon, 14 Jan 2008)
New Revision: 92890
Added:
trunk/mcs/errors/gcs0832-2.cs
trunk/mcs/errors/gcs0832.cs
trunk/mcs/errors/gcs0834.cs
trunk/mcs/errors/gcs0835.cs
trunk/mcs/errors/gcs1946.cs
trunk/mcs/errors/gcs1951-2.cs
trunk/mcs/errors/gcs1951.cs
Modified:
trunk/mcs/errors/cs1660-2.cs
trunk/mcs/errors/cs1660.cs
trunk/mcs/errors/gcs1660.cs
Log:
New tests, update.
Modified: trunk/mcs/errors/cs1660-2.cs
===================================================================
--- trunk/mcs/errors/cs1660-2.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/cs1660-2.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -1,4 +1,4 @@
-// CS1660: Cannot convert `anonymous method' to type `int' because it is not a
delegate type
+// CS1660: Cannot convert `anonymous method' to non-delegate type `int'
// Line: 9
using System;
Modified: trunk/mcs/errors/cs1660.cs
===================================================================
--- trunk/mcs/errors/cs1660.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/cs1660.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -1,4 +1,4 @@
-// CS1660: Cannot convert `anonymous method' to type `object' because it is
not a delegate type
+// CS1660: Cannot convert `anonymous method' to non-delegate type `object'
// Line: 9
using System;
Added: trunk/mcs/errors/gcs0832-2.cs
===================================================================
--- trunk/mcs/errors/gcs0832-2.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs0832-2.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,15 @@
+// CS0832: An expression tree cannot contain an assignment operator
+// Line: 13
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+ delegate void D (string s);
+
+ public static void Main ()
+ {
+ Expression<D> e = (a) => a = "a";
+ }
+}
Added: trunk/mcs/errors/gcs0832.cs
===================================================================
--- trunk/mcs/errors/gcs0832.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs0832.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,15 @@
+// CS0832: An expression tree cannot contain an assignment operator
+// Line: 13
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+ delegate void D (string s);
+
+ public static void Main ()
+ {
+ Expression<D> e = (a) => a = "a";
+ }
+}
Added: trunk/mcs/errors/gcs0834.cs
===================================================================
--- trunk/mcs/errors/gcs0834.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs0834.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,14 @@
+// CS0834: A lambda expression with statement body cannot be converted to an
expresion tree
+// Line: 12
+
+using System.Linq.Expressions;
+
+class C
+{
+ delegate bool D ();
+
+ public void Foo ()
+ {
+ Expression<D> e = () => { return true; };
+ }
+}
Added: trunk/mcs/errors/gcs0835.cs
===================================================================
--- trunk/mcs/errors/gcs0835.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs0835.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,12 @@
+// CS0835: Cannot convert `lambda expression' to an expression tree of
non-delegate type `string'
+// Line: 10
+
+using System.Linq.Expressions;
+
+class C
+{
+ public void Foo ()
+ {
+ Expression<string> e = () => "a";
+ }
+}
Modified: trunk/mcs/errors/gcs1660.cs
===================================================================
--- trunk/mcs/errors/gcs1660.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs1660.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -1,6 +1,5 @@
-// CS1660: Cannot convert `lambda expression' to type `object' because it is
not a delegate type
-// Line: 10
-// Compiler options: -langversion:linq
+// CS1660: Cannot convert `lambda expression' to non-delegate type `object'
+// Line: 9
using System;
Added: trunk/mcs/errors/gcs1946.cs
===================================================================
--- trunk/mcs/errors/gcs1946.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs1946.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,15 @@
+// CS1946: An anonymous method cannot be converted to an expression tree
+// Line: 11
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+ delegate string D ();
+
+ public static void Main ()
+ {
+ Expression<D> e = delegate () { return "a"; };
+ }
+}
Added: trunk/mcs/errors/gcs1951-2.cs
===================================================================
--- trunk/mcs/errors/gcs1951-2.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs1951-2.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,15 @@
+// CS1951: An expression tree parameter cannot use `ref' or `out' modifier
+// Line: 13
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+ delegate int D (out int a);
+
+ public static void Main ()
+ {
+ Expression<D> e = (out int a) => a = 0;
+ }
+}
Property changes on: trunk/mcs/errors/gcs1951-2.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1951.cs
===================================================================
--- trunk/mcs/errors/gcs1951.cs 2008-01-14 18:06:47 UTC (rev 92889)
+++ trunk/mcs/errors/gcs1951.cs 2008-01-14 18:07:15 UTC (rev 92890)
@@ -0,0 +1,15 @@
+// CS1951: An expression tree parameter cannot use `ref' or `out' modifier
+// Line: 13
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+ delegate int D (ref int a);
+
+ public static void Main ()
+ {
+ Expression<D> e = (ref int a) => a;
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches