New test.
authorMarek Safar <marek.safar@gmail.com>
Fri, 9 Nov 2007 16:09:06 +0000 (16:09 -0000)
committerMarek Safar <marek.safar@gmail.com>
Fri, 9 Nov 2007 16:09:06 +0000 (16:09 -0000)
svn path=/trunk/mcs/; revision=89325

mcs/errors/gcs0837.cs [new file with mode: 0644]

diff --git a/mcs/errors/gcs0837.cs b/mcs/errors/gcs0837.cs
new file mode 100644 (file)
index 0000000..048bdae
--- /dev/null
@@ -0,0 +1,17 @@
+// CS0837: The `as' operator cannot be applied to a lambda expression or anonymous method
+// Line: 15
+// Compiler options: -langversion:linq
+
+class X
+{
+       delegate void D ();
+       
+       static void Test (D d)
+       {
+       }
+       
+       static void Main ()
+       {
+               Test ((() => { }) as D);
+       }
+}