These new error tests make sure that Linq syntax fails correctly when
authorScott Thomas <lunchtimemama@gmail.com>
Wed, 9 May 2007 03:58:56 +0000 (03:58 -0000)
committerScott Thomas <lunchtimemama@gmail.com>
Wed, 9 May 2007 03:58:56 +0000 (03:58 -0000)
not compiling for Linq

svn path=/trunk/mcs/; revision=76983

mcs/errors/ChangeLog
mcs/errors/gcs1031.cs [new file with mode: 0644]
mcs/errors/gcs1526-2.cs [new file with mode: 0644]
mcs/errors/gcs1526.cs [new file with mode: 0644]

index 8fc18c020d2cb018cc0ab507f9b48f2411dddc05..b4c5da29530d8d8488545822b860ca363af7129e 100644 (file)
@@ -1,3 +1,10 @@
+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
diff --git a/mcs/errors/gcs1031.cs b/mcs/errors/gcs1031.cs
new file mode 100644 (file)
index 0000000..12c569f
--- /dev/null
@@ -0,0 +1,11 @@
+// CS1031: Type expected
+// Line: 9
+using System;
+
+public class Test
+{
+       static void Main ()
+       {
+               string [] array = new [] { "Foo", "Bar", "Baz" };
+       }
+}
diff --git a/mcs/errors/gcs1526-2.cs b/mcs/errors/gcs1526-2.cs
new file mode 100644 (file)
index 0000000..1a22f5e
--- /dev/null
@@ -0,0 +1,12 @@
+// 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" };
+       }
+}
diff --git a/mcs/errors/gcs1526.cs b/mcs/errors/gcs1526.cs
new file mode 100644 (file)
index 0000000..ad957b0
--- /dev/null
@@ -0,0 +1,16 @@
+// 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" };
+       }
+}