not compiling for Linq
svn path=/trunk/mcs/; revision=76983
+2007-05-08 Scott Peterson <lunchtimemama@gmail.com>
+ * gcs1526.cs:
+ * gcs1526-2.cs:
+ * gcs1031.cs:
+ Make sure that Linq syntax fails correctly
+ when not compiling for Linq.
+
2007-05-02 Raja R Harinath <rharinath@novell.com>
* cs1534-2.cs: New test. Ensure that the error handling isn't
--- /dev/null
+// CS1031: Type expected
+// Line: 9
+using System;
+
+public class Test
+{
+ static void Main ()
+ {
+ string [] array = new [] { "Foo", "Bar", "Baz" };
+ }
+}
--- /dev/null
+// CS1526: A new expression requires () or [] after type
+// Line: 10
+using System;
+using System.Collections.Generic;
+
+public class Test
+{
+ static void Main ()
+ {
+ List<string> list = new List<string> { "Foo", "Bar", "Baz" };
+ }
+}
--- /dev/null
+// CS1526: A new expression requires () or [] after type
+// Line: 14
+using System;
+
+public class Test
+{
+ private class A
+ {
+ public string B;
+ }
+
+ static void Main ()
+ {
+ A a = new A { B = "foo" };
+ }
+}